fix(gateway): recover stale pid files and release evicted clients - #14609
fix(gateway): recover stale pid files and release evicted clients#14609LeonSGP43 wants to merge 1 commit into
Conversation
|
Thanks for this, @LeonSGP43 — both issues you identified were real, and the analysis in #14598 was solid. Closing because both halves have since been fixed independently on Eviction httpx leak — fixed by #29298 / #41974. Stale PID file on startup — fixed by 402d048 ("also unlink stale PID + lock files on cleanup"), which landed 2026-04-22, the day before this PR was opened. That commit made I verified this end-to-end against a temp Your fix was correct for the state of the tree when you filed it — the auto-cleanup commit just beat it by a few hours. Appreciate the careful write-up. |
Summary
gateway.pidis still present after the runtime lock is acquired_evict_cached_agent()drops a cached agentTesting
python3 -m pytest -o addopts='' -q tests/gateway/test_agent_cache.py -k 'evict' tests/gateway/test_runner_startup_failures.py -k 'stale_pid or start_gateway'python3 -m pytest -o addopts='' -q tests/tools/test_zombie_process_cleanup.py -k 'evict_does_not_call_close' tests/gateway/test_session_model_reset.py -k 'evict'Closes #14598