You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The tasks are not finalized when the process fails: resources left open in a long-running worker #373
FinalizableTaskInterface::finalize() is never called when a process fails: ProcessManager::doExecute() finalizes the tasks only after a successful resolution, the catch does not.
The resources opened by the tasks stay open in a long-running worker (Messenger, UI bundle): file handles of the CSV, JSON stream, XML and line readers / writers, and the cursor of doctrine_database_reader. With MySQL unbuffered queries, every next execution of the worker then fails (2014 Cannot execute queries while other unbuffered queries are active), including unrelated processes and the writes of the UI bundle in process_execution.
Fix: when the process fails, finalize every initialized task, each one in its own try/catch (a finalization failure is logged and does not hide the original error). This changes the contract of finalize(), to document: it is called whether the process succeeds or fails (e.g. StatCounterTask also logs its count on failure).
Found during the audit v3 (audit-v3-angles.md#177).
Activity
Merge pull request #379 from cleverage/373