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
comfyui: stop and the reinstall guard trust a bare PID #547
rocm comfyui start records only a PID. Two things trust that bare PID: rocm comfyui stop, and the --reinstall running guard from #546. They check it with kill -0 or tasklist, so if ComfyUI has exited and the PID has been reused:
stop can terminate an unrelated process tree.
The guard can refuse a reinstall because of someone else's process.
Separately, stop deletes the saved state after a short wait even when the process survives termination. That clears the guard while ComfyUI is still running.
Expected behavior
Identify ComfyUI by PID plus process start time, as rocm_core::proc_lifecycle already does for managed services, and never act on a process whose identity doesn't match. Keep the saved state when termination fails.
Possible solution
At start, record a ProcessIdentity.
In stop, use terminate_verified.
In the guard, use an identity check.
Related: #546, and the identity-verified stop work for rocmd in #499.
Possibly related evidence: during the ROCMAI-86 (Phase 6f main.rs modularization) stack's local verification (cargo test --workspace --no-fail-fast, 2026-10-27), on a branch with no changes to comfyui.rs, this test intermittently failed:
comfyui::tests::reinstall_is_refused_while_comfyui_starts_until_it_is_stopped — passed cleanly on an immediate isolated rerun. Given this issue's description of PID reuse causing the reinstall guard/stop path to misjudge a process's liveness, a test exercising "reinstall is refused while comfyui starts until it is stopped" seems like a plausible symptom of the same root cause, though I haven't traced the exact mechanism — flagging for whoever picks this up to judge, not asserting it's definitely the same bug.
Activity
jussielo-amd commentedon Oct 27, 2026
Possibly related evidence: during the ROCMAI-86 (Phase 6f
main.rsmodularization) stack's local verification (cargo test --workspace --no-fail-fast, 2026-10-27), on a branch with no changes tocomfyui.rs, this test intermittently failed:comfyui::tests::reinstall_is_refused_while_comfyui_starts_until_it_is_stopped— passed cleanly on an immediate isolated rerun. Given this issue's description of PID reuse causing the reinstall guard/stop path to misjudge a process's liveness, a test exercising "reinstall is refused while comfyui starts until it is stopped" seems like a plausible symptom of the same root cause, though I haven't traced the exact mechanism — flagging for whoever picks this up to judge, not asserting it's definitely the same bug.