Skip to content

fix: reap dashboard and TUI child processes - #27073

Closed
solovision24 wants to merge 4 commits into
NousResearch:mainfrom
solovision24:fix/runtime-closeout-leak-t_0774510e
Closed

fix: reap dashboard and TUI child processes#27073
solovision24 wants to merge 4 commits into
NousResearch:mainfrom
solovision24:fix/runtime-closeout-leak-t_0774510e

Conversation

@solovision24

Copy link
Copy Markdown

Summary

  • add dashboard action waiter threads to reap completed subprocesses and close inherited log handles
  • preserve latest dashboard action status after removing exited Popen handles
  • add TUI slash-worker waiter thread so exited slash workers do not remain defunct

Test Plan

  • python -m pytest tests/hermes_state/test_repair_stale_open_sessions.py tests/hermes_cli/test_web_server.py::test_dashboard_action_waiter_reaps_completed_child tests/test_tui_gateway_server.py::test_slash_worker_waiter_reaps_exited_process tests/cli/test_single_query_closeout.py -q -o 'addopts='\n- python -m pytest tests/hermes_cli/test_web_server.py tests/test_tui_gateway_server.py tests/hermes_state/test_repair_stale_open_sessions.py tests/cli/test_single_query_closeout.py -q -o 'addopts='\n\n## Notes\n- Existing zombies under already-running dashboard/TUI processes require a service restart to disappear; this patch prevents new leaks once deployed.

@alt-glitch alt-glitch added type/bug Something isn't working P1 High — major feature broken, no workaround comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery labels May 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competes with #22863 (robust slash_worker lifecycle management). Both address the slash_worker zombie leak (#21370). This PR also adds dashboard action waiter threads (broader scope).

@teknium1

teknium1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Superseded by #42132 (merged), which closes the slash_worker subprocess leak via two guards: process-group kill on PTY teardown + a cross-platform parent-death watchdog in the worker. Closing as resolved — thanks for tackling this; the merged fix salvaged the process-group-kill and watchdog approaches with contributor authorship preserved.

@teknium1 teknium1 closed this Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants