Hyperfoil / qDup

Lab automation and queuing scripting
Apache License 2.0
12 stars 12 forks source link

abort management issue #191

Closed vitorz closed 1 year ago

vitorz commented 1 year ago

There is an issue occurring during the management of the aborting process, for example when a sigterm signal (the same signal sent by Jenkins, when a job is aborted, to the current command being executed) is sent to a running qDup process instance. The problem is the partial execution of the command under cleanup-scripts, if any is present. In other words not all the commands are executed causing the cleanup being not complete. After having analyzed the issue in my opinion the cause of the issue is the missing synchronization between the shutdown-abort thread and the main thread which control the execution of the cleanup-scripts. As the "shutdown-abort" executes few short-running actions without waiting any thread it reaches his last command very fast causing the end of the process while other threads are still executing commands. Another minor issue related to the main one is that the log4j Logger has his own automatic shutdown hook which makes silent (no log) the very few cleanup commands actually executed during the abort phase.