hermes - 💡(How to fix) Fix [workflow-engine] HIGH: loop and bash nodes leak subprocesses on timeout

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fix

On asyncio.TimeoutError:

proc.kill()
await proc.wait()

in both the loop node and the bash node paths.


Filed from opus-4.8 plugin audit (workflow-engine).

Code Example

proc.kill()
await proc.wait()
RAW_BUFFERClick to expand / collapse

Severity: HIGH (correctness/concurrency, resource leak)

Loop and bash nodes leak subprocesses on timeout.

Evidence

  • plugins/workflow-engine/engine/nodes/loop.py:29-42_run_until_bash wait_for timeout is caught by a bare except and returns False, but the subprocess is never killed → leaked/zombie bash processes accumulate across loop iterations.
  • plugins/workflow-engine/engine/nodes/bash.py:64-69 — kills the process on timeout but never await proc.wait(), leaving a zombie.

Impact

Long-running or looping workflows accumulate leaked/zombie processes for the daemon process lifetime — fd and PID exhaustion under sustained use.

Fix

On asyncio.TimeoutError:

proc.kill()
await proc.wait()

in both the loop node and the bash node paths.


Filed from opus-4.8 plugin audit (workflow-engine).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING