Skip to content

AthSequencer and CoreDumpSvc: Delay timer creation until first use

Rafal Bielski requested to merge rbielski/athena:remove-timer into master

AthSequencer and CoreDumpSvc both exploit Athena::AlgorithmTimer to abort the job on timeout. While I'm not convinced to the internal implementation of Athena::AlgorithmTimer with the use of timer_create, any timer implementation will require a new thread to be created. In the current implementation the timers were instantiated in the constructors of AthSequencer and CoreDumpSvc, meaning the extra thread (in this case timer_helper_thread spawned by timer_create) was created very early in the job. This poses risks for multi-process jobs, as extra threads existing before fork may lead to undefined/buggy behaviour. The issue was discovered in ATR-19792.

In this MR, I delay the creation of these timers until their first use, which in the case of jobs I tested means they are never created (thus the extra thread is never started).

Asking for explicit approval from @ssnyder or @tsulaia or @fwinkl (please click the Approve button)

Merge request reports

Loading