Client or integration
GitHub Actions — Cross-platform CI (ci.yml), Linux test N/4 shards
Area
Service lifecycle
Summary
Linux test shards intermittently stop producing output mid-run and are killed at the 15-minute job timeout. The run reports cancelled, not failure, so it reads as infrastructure noise — but it is reproducible enough across unrelated branches to be worth tracking rather than rerunning past.
Filing this because I hit it five times today while doing maintainer triage and kept treating it as flake. That was the wrong call: the hang is consistent in shape, and cancelled runs are easy to rerun into green without anyone noticing the underlying problem.
Observed pattern
Every occurrence looks the same:
- the shard runs normally for ~30-90 seconds and passes hundreds of tests;
- output stops abruptly right after a test that starts a proxy server;
- nothing further is logged for ~14 minutes;
- the runner cancels at the 15-minute timeout;
- cleanup reports
Terminate orphan process: pid (NNNN) (bun).
Across four runs on four unrelated branches, the affected shard varies, which argues against a single bad test:
| Run |
Branch |
Shard |
Result |
| 31263738953 |
codex/260808-1185-windows-shard-assertion |
test 4/4 |
cancelled (twice, incl. rerun) |
| 31255199569 |
fix/windows-powershell-popup |
test 2/4 |
cancelled, green on retry |
| 31258815611 |
codex/260808-1195-unbound-quota-unknown |
test 3/4 |
cancelled, green on retry |
| 31152916419 |
agent/test-windows-ci-shard-command |
test 3/4 |
failure — EEXIST: epoll_ctl in a Bun WriteStream |
It also occurred on dev itself with no PR involved (runs 31259450263, 31259447622), so it is not contributor-branch specific.
The one non-cancelled instance is the useful clue
Run 31152916419 did not hang — it crashed outright while loading tests/autostart-health.test.ts:
# Unhandled error between tests
error: EEXIST: file already exists, epoll_ctl
at new WriteStream (internal:fs/streams:244:58)
# collateral:
error: Cannot call describe() after the test run has completed
EEXIST from epoll_ctl means a file descriptor was registered with the event loop twice. That is the same class of resource-lifecycle problem a hang would produce if the registration deadlocked instead of erroring, which suggests the hang and the crash are one bug with two outcomes rather than two problems.
Last log line before the stall
In 31263738953 (test 4/4), the final output before 14 minutes of silence:
[web-search-loop] done — 1 search, 2 iterations, 13ms
[web-search-loop] cancelled — 1 real searches, 0 placeholders, 13ms
(pass) routed Claude requests give OpenAI sidecars main auth without leaking it to the routed provider
That test is in tests/claude-messages-endpoint.test.ts, and the stall is after it passes — so the suspect is teardown or the next file's setup, not the assertion. In the other runs the stall also follows a test that had just started a proxy listener.
Not reproducible locally
bun test tests/claude-messages-endpoint.test.ts → 38 pass / 0 fail in 2.7s on macOS. Full bun run test → 10009 pass / 0 fail. So this needs the sharded Linux runner environment; a single-file local run will not show it.
Why this matters beyond the noise
cancelled is not failure, and the natural response is to rerun. That works — three of the four went green on retry. The risk is that a genuine hang introduced by a future change is indistinguishable from this, and gets rerun into green by whoever is on triage that day.
Suggested starting points
- The orphan is always
bun, and the stall always follows a proxy-server test, so an un-awaited server close or an fd registered twice across test-file boundaries is the first place to look.
--isolate is already used; whether shard boundaries share any process-global listener state is worth checking.
- Raising the timeout would hide it. A shard that stops emitting for 14 minutes has already failed.
Version
dev at 14e948525.
Operating system
ubuntu-latest GitHub-hosted runners.
Client or integration
GitHub Actions — Cross-platform CI (
ci.yml), Linuxtest N/4shardsArea
Service lifecycle
Summary
Linux test shards intermittently stop producing output mid-run and are killed at the 15-minute job timeout. The run reports
cancelled, notfailure, so it reads as infrastructure noise — but it is reproducible enough across unrelated branches to be worth tracking rather than rerunning past.Filing this because I hit it five times today while doing maintainer triage and kept treating it as flake. That was the wrong call: the hang is consistent in shape, and
cancelledruns are easy to rerun into green without anyone noticing the underlying problem.Observed pattern
Every occurrence looks the same:
Terminate orphan process: pid (NNNN) (bun).Across four runs on four unrelated branches, the affected shard varies, which argues against a single bad test:
codex/260808-1185-windows-shard-assertiontest 4/4fix/windows-powershell-popuptest 2/4codex/260808-1195-unbound-quota-unknowntest 3/4agent/test-windows-ci-shard-commandtest 3/4EEXIST: epoll_ctlin a BunWriteStreamIt also occurred on
devitself with no PR involved (runs31259450263,31259447622), so it is not contributor-branch specific.The one non-cancelled instance is the useful clue
Run
31152916419did not hang — it crashed outright while loadingtests/autostart-health.test.ts:EEXISTfromepoll_ctlmeans a file descriptor was registered with the event loop twice. That is the same class of resource-lifecycle problem a hang would produce if the registration deadlocked instead of erroring, which suggests the hang and the crash are one bug with two outcomes rather than two problems.Last log line before the stall
In
31263738953(test 4/4), the final output before 14 minutes of silence:That test is in
tests/claude-messages-endpoint.test.ts, and the stall is after it passes — so the suspect is teardown or the next file's setup, not the assertion. In the other runs the stall also follows a test that had just started a proxy listener.Not reproducible locally
bun test tests/claude-messages-endpoint.test.ts→ 38 pass / 0 fail in 2.7s on macOS. Fullbun run test→ 10009 pass / 0 fail. So this needs the sharded Linux runner environment; a single-file local run will not show it.Why this matters beyond the noise
cancelledis notfailure, and the natural response is to rerun. That works — three of the four went green on retry. The risk is that a genuine hang introduced by a future change is indistinguishable from this, and gets rerun into green by whoever is on triage that day.Suggested starting points
bun, and the stall always follows a proxy-server test, so an un-awaited server close or an fd registered twice across test-file boundaries is the first place to look.--isolateis already used; whether shard boundaries share any process-global listener state is worth checking.Version
devat14e948525.Operating system
ubuntu-latestGitHub-hosted runners.