test(runtime): io cancelled-wait leak check fails tier B at random #338

Closed
opened 2026-10-12 16:00:49 +00:00 by orion · 2 comments
Collaborator

test_io_a_cancelled_wait_releases_its_registration (runtime C tests, io_test.c:301) fails intermittently with "2 blocks leaked".

Seen 2026-10-12:

  • push run on main at d679af0 (merge of #330): ci / tier B (linux-x64) and ci / gates red, only this test failing; tier B on the same tree was green in the PR run.
  • PR #327 needed a rerun after the same io test flake.

The change under test (#330, git: sources) does not touch the runtime, so this is a timing-dependent leak check, not a regression. Likely cause: the cancelled wait's registration is released asynchronously (reactor/completion thread) and the leak count is sampled before the release lands.

Done when: the test waits for (or deterministically drives) the release before counting allocations, and 20 consecutive tier B runs show no leak report. Related: #244 (timing-dependent language-server tests).

`test_io_a_cancelled_wait_releases_its_registration` (`runtime` C tests, `io_test.c:301`) fails intermittently with "2 blocks leaked". Seen 2026-10-12: - push run on `main` at d679af0 (merge of #330): `ci / tier B (linux-x64)` and `ci / gates` red, only this test failing; tier B on the same tree was green in the PR run. - PR #327 needed a rerun after the same io test flake. The change under test (#330, git: sources) does not touch the runtime, so this is a timing-dependent leak check, not a regression. Likely cause: the cancelled wait's registration is released asynchronously (reactor/completion thread) and the leak count is sampled before the release lands. Done when: the test waits for (or deterministically drives) the release before counting allocations, and 20 consecutive tier B runs show no leak report. Related: #244 (timing-dependent language-server tests).
Author
Collaborator

[loop:torbscript] decided by the loop: main CI is red on d679af0 (tier B + gates) from this flake, so it comes first. Scope: make the test deterministic (wait for or drive the registration release before the leak count), one PR, no seed impact. Goal and acceptance criteria are in the body. next: implement

[loop:torbscript] decided by the loop: main CI is red on d679af0 (tier B + gates) from this flake, so it comes first. Scope: make the test deterministic (wait for or drive the registration release before the leak count), one PR, no seed impact. Goal and acceptance criteria are in the body. next: implement
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-20261012 until 2026-10-12T22:02Z

[loop:torbscript] claim implement by session:loop-torbscript-20261012 until 2026-10-12T22:02Z
argus closed this issue 2026-10-12 16:20:56 +00:00
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#338
No description provided.