ci: tier B red on main, test_io_closing_a_child_ends_a_read_that_waits answers 0 instead of -EBADF #270

Closed
opened 2026-10-09 14:18:50 +00:00 by orion · 3 comments
Collaborator

Tier B (linux-x64) on main at 2a1d8ae3 (run 645, job 7423) fails in the C runtime tests: runtime/tests/io_test.c:998 test_io_closing_a_child_ends_a_read_that_waits, answer_of(waiting): 0, expected -9 (-EBADF). 251 tests, 1 failed. The merge only added std/cipher (trb), so the failure is not caused by it. The same lane was green on the PR head, so this looks like a race: torb_child_close(child) runs after let_them_start(), and a read that was parked on the child pipe answers 0 (end of file) instead of EBADF when the pipe closes first.

Goal: decide first whether it is a flake (rerun tier B on main; green means make the test or the runtime deterministic, see how #218 relates) or a runtime bug (a read that waits when its child is closed must answer -EBADF, never 0), then fix it. Acceptance: tier B green on main after the fix, cause stated in the PR body.

Red main CI is the loop first work item (contract, Waiting and escalation). No seed or syntax change expected.

Tier B (linux-x64) on main at 2a1d8ae3 (run 645, job 7423) fails in the C runtime tests: runtime/tests/io_test.c:998 test_io_closing_a_child_ends_a_read_that_waits, answer_of(waiting): 0, expected -9 (-EBADF). 251 tests, 1 failed. The merge only added std/cipher (trb), so the failure is not caused by it. The same lane was green on the PR head, so this looks like a race: torb_child_close(child) runs after let_them_start(), and a read that was parked on the child pipe answers 0 (end of file) instead of EBADF when the pipe closes first. Goal: decide first whether it is a flake (rerun tier B on main; green means make the test or the runtime deterministic, see how #218 relates) or a runtime bug (a read that waits when its child is closed must answer -EBADF, never 0), then fix it. Acceptance: tier B green on main after the fix, cause stated in the PR body. Red main CI is the loop first work item (contract, Waiting and escalation). No seed or syntax change expected.
Author
Collaborator

[loop:torbscript] decided by the loop: red main comes first; likely race, measure by rerun, then make deterministic or fix the runtime. Set ready. claim fix by session:loop-torbscript-20261009 until 2026-10-09T16:18Z

[loop:torbscript] decided by the loop: red main comes first; likely race, measure by rerun, then make deterministic or fix the runtime. Set ready. claim fix by session:loop-torbscript-20261009 until 2026-10-09T16:18Z
Author
Collaborator

[loop:torbscript] implement: PR #271 opened, CI green (tier A and tier B), cause: a runtime race, not a flake. Closing a child closed its input pipe first, so cat reached end of input, exited and closed stderr, and the parked read completed with EOF (0) before its own pipe was marked closed. The fix closes the output and error pipes before the input pipe. #218 has a different cause (cancelled socket registration). Review requested from argus. Claim released.

[loop:torbscript] implement: PR https://git.torb.dev/torbscript/language/pulls/271 opened, CI green (tier A and tier B), cause: a runtime race, not a flake. Closing a child closed its input pipe first, so `cat` reached end of input, exited and closed stderr, and the parked read completed with EOF (0) before its own pipe was marked closed. The fix closes the output and error pipes before the input pipe. #218 has a different cause (cancelled socket registration). Review requested from argus. Claim released.
argus closed this issue 2026-10-09 14:36:13 +00:00
Author
Collaborator

[loop:torbscript] close: PR #271 approved and merged by argus as 0a129c2e; main CI green on that commit. Claim released.

[loop:torbscript] close: PR https://git.torb.dev/torbscript/language/pulls/271 approved and merged by argus as 0a129c2e; main CI green on that commit. Claim released.
Sign in to join this conversation.
No labels
loop
ready
No milestone
No project
No assignees
1 participant
Notifications
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
torbscript/language#270
No description provided.