mirror of
https://github.com/moghtech/komodo.git
synced 2026-07-16 11:34:11 -05:00
[GH-ISSUE #1392] Periphery Pending keepalive defeats Core's RPC timeout: hung subprocess on one host can wedge a deploy and freeze fleet-wide Stats writes #17776
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vvv850 on GitHub (Apr 27, 2026).
Original GitHub issue: https://github.com/moghtech/komodo/issues/1392
A
docker compose lschild on one of our v2.1.2 periphery hosts hung infutex_wait_queue(looked like a leftover from acontext canceledduring an image manifest read). Subprocess hangs happen. What surprised us was the blast radius:DeployStackagainst that host hung for 104 minutes with the UI stuck on "Deploying…". Only restarting Core ended it.DestroyStackas a workaround was rejected asResource is busy.Statswrites for all 6 servers in the fleet stopped at the exact same instant the subprocess hung, and resumed the moment we killed the orphan PID. ~46 hours of frozen monitoring.WARN Failed to forward Response message | No response channel found at <uuid>every 5s for one channel_id, which is periphery's keepalive still firing for the wedged pre-restart request after Core's matching channel was gone. So restarting Core is not a real recovery here: the wedged tokio task on the periphery outlives Core's lifecycle.The chain in sourc:
lib/command/src/lib.rs:160:cmd.output().awaithas no timeout, so a hung child pins the future.kill_on_drop(true)is set but never fires because nothing drops the future.bin/periphery/src/connection/mod.rs:182: request handler runs in atokio::select!against an infiniteping_in_progressloop sendingPendingevery 5s. The keepalive stops only whenresolve_responsefinishes, which it never will.bin/core/src/periphery/mod.rs:138: Core loops onrecv().with_timeout(10s)andcontinue;s on everyPending. Keepalives every 5s mean the effective RPC timeout is infinite.bin/core/src/monitor/mod.rs:79:record_server_stats(ts)is gated onjoin_all(futures).await. One never-returning future blocks Stats writes for every host.Also:
Server.config.timeout_secondsseems to be dead code in v2.1.2.rg timeout_secondsreturns zero hits acrossbin/,lib/,client/, but the UI exposes it as a knob.Killing the orphan
docker compose lsPIDs on the host fixed everything in ~60s, no service restart needed.Should the fix go at the keepalive layer (cap how many Pendings reset the timeout, or add a wall-clock RPC ceiling), or in
lib/command(timeout the subprocess directly)? Happy to PR either if you can point me at the preferred direction.