Skip to content

A finalization failure does not make the process fail; process_launcher leaves its sub-processes running when the process fails #396

Closed

Description

@njoubert-cleverage

Two issues at the end of a process, now that the tasks are finalized when it fails (#373):

  • A finalization failure does not make the process fail: when finalize() throws on a process that has succeeded, the exception is logged as critical, the process history is flagged as failed and "Process … failed" is logged, but ProcessManager::execute() returns normally. The cleverage_process.end event is dispatched (the UI records the execution as finish), the command exits with 0, and a parent process (process_executor) goes on.
  • process_launcher leaves its sub-processes running: when the process fails or is stopped (stop request, StopTask) while sub-processes launched by process_launcher are still running, nothing stops them. They go on with their side effects after the end of the process, their error output is no longer read (risk of blocking on a full pipe), and their JSON buffers are left in the temporary directory.

Fix: once every task is finalized, throw a ProcessFailedException if a finalization has failed; make ProcessLauncherTask finalizable, to stop its running sub-processes and remove the buffers that will never be output.

Found during the audit v3 (audit-v3-angles.md #179, #180).

Activity

  1. added a commit that references this issue on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions