Bug
crates/genie-governor/src/control.rs accepts connections on /run/geniepod/governor.sock and spawns one task per peer. handle_connection awaits read_control_line, which blocks on fill_buf() with no idle-read deadline.
Line size is capped (MAX_CONTROL_LINE_BYTES, #243/#251), but read time is not. A peer that connects and stalls (sends nothing, or bytes with no trailing \n) holds the task and socket fd forever. The accept loop has no concurrency cap, so N stalled peers leak N tasks/fds on the Jetson governor daemon.
Sibling pattern already fixed elsewhere: genie-core HTTP (#195), HA/LLM clients (#173/#181/#655), and this same crate's service_ctl/tegra_reader subprocess timeouts — control socket reads were never given the same treatment.
Expected
An idle peer should hit a read deadline, the connection should close, and the task should exit.
Actual
fill_buf().await parks until the peer closes or sends a newline. Stalled open peers never time out.
Suggested fix
Wrap read_control_line in tokio::time::timeout(CONTROL_READ_TIMEOUT, ...) (e.g. 30s) and break the connection loop on elapsed, matching SERVICE_CTL_TIMEOUT spirit in service_ctl.rs.
Bug
crates/genie-governor/src/control.rsaccepts connections on/run/geniepod/governor.sockand spawns one task per peer.handle_connectionawaitsread_control_line, which blocks onfill_buf()with no idle-read deadline.Line size is capped (
MAX_CONTROL_LINE_BYTES, #243/#251), but read time is not. A peer that connects and stalls (sends nothing, or bytes with no trailing\n) holds the task and socket fd forever. The accept loop has no concurrency cap, so N stalled peers leak N tasks/fds on the Jetson governor daemon.Sibling pattern already fixed elsewhere: genie-core HTTP (#195), HA/LLM clients (#173/#181/#655), and this same crate's
service_ctl/tegra_readersubprocess timeouts — control socket reads were never given the same treatment.Expected
An idle peer should hit a read deadline, the connection should close, and the task should exit.
Actual
fill_buf().awaitparks until the peer closes or sends a newline. Stalled open peers never time out.Suggested fix
Wrap
read_control_lineintokio::time::timeout(CONTROL_READ_TIMEOUT, ...)(e.g. 30s) and break the connection loop on elapsed, matchingSERVICE_CTL_TIMEOUTspirit inservice_ctl.rs.