Flaky: agents.rs an_agent_that_dies_says_so_and_starts_again_on_send: the restart says "couldn't start the agent" #64

Closed
opened 2026-10-02 12:24:23 +00:00 by jhgaylor · 1 comment
Owner

Found during #55 (macOS CI fix for M16, branch ci-mac-m16).

Once in a full just check on Linux (passed 15 of 15 runs of cargo test -p illogicald --test agents alone afterwards):

agents.rs:168: ... "error":"couldn't start the agent: couldn't start python3 .../crates/daemon/tests/fake_acp.py" ... "queued":["cra...

The test took 2.68s, so it isn't spawn_local's 5s deadline: the child (systemd-run, then the shim) exited before the shim wrote the program's pid to the record. The restart comes right after the fake agent's crash (os._exit(3)), so a likely suspect is the old shim and the new spawn sharing the block's record path (spawn_local removes it, the old shim notes how it ended a moment after its pipe closes), or systemd-run refusing the scope under load. The agent.err of the block would say which.

Found during #55 (macOS CI fix for M16, branch ci-mac-m16). Once in a full `just check` on Linux (passed 15 of 15 runs of `cargo test -p illogicald --test agents` alone afterwards): ``` agents.rs:168: ... "error":"couldn't start the agent: couldn't start python3 .../crates/daemon/tests/fake_acp.py" ... "queued":["cra... ``` The test took 2.68s, so it isn't spawn_local's 5s deadline: the child (systemd-run, then the shim) exited before the shim wrote the program's pid to the record. The restart comes right after the fake agent's `crash` (os._exit(3)), so a likely suspect is the old shim and the new spawn sharing the block's record path (spawn_local removes it, the old shim notes how it ended a moment after its pipe closes), or systemd-run refusing the scope under load. The agent.err of the block would say which.
Author
Owner

Couldn't reproduce (0/300 under load), but fixed a real race in that path: a start was reported failed when the program recorded its pid and exited between two checks. Failed starts now report how the shim exited and agent.err's last lines. Reopen with that output if it comes back.

Couldn't reproduce (0/300 under load), but fixed a real race in that path: a start was reported failed when the program recorded its pid and exited between two checks. Failed starts now report how the shim exited and agent.err's last lines. Reopen with that output if it comes back.
jhgaylor referenced this issue from a commit 2026-10-02 15:54:55 +00:00
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jhgaylor/illogical#64
No description provided.