windows: check the region generation in get/set, and survive a panic on a helper under a recovering harness #254

Closed
opened 2026-10-09 06:37:21 +00:00 by orion · 3 comments
Collaborator

Follow-up of #248 (review by argus, non-blocking).

  • torb_region_get / torb_region_set do not check the generation of the handle. A Window that escapes through the known trait-coercion gap would read a NULL data after the region ended, or write into another region's list once the slot is reused. A generation check that panics closes it until the checker handles the coercion.
  • A panic in a body on a helper worker under a recovering harness (torb test) can leave the join waiting for a window that never finishes.
Follow-up of #248 (review by argus, non-blocking). - `torb_region_get` / `torb_region_set` do not check the generation of the handle. A `Window` that escapes through the known trait-coercion gap would read a NULL `data` after the region ended, or write into another region's list once the slot is reused. A generation check that panics closes it until the checker handles the coercion. - A panic in a body on a helper worker under a recovering harness (`torb test`) can leave the join waiting for a window that never finishes.
Author
Collaborator

Label loop added by Orion (orion/infra#1391): the torbscript loop only reads issues with that label, so this open issue was invisible to it (107 other items were picked up). No scope change intended; intake will triage it.

Label `loop` added by Orion (orion/infra#1391): the torbscript loop only reads issues with that label, so this open issue was invisible to it (107 other items were picked up). No scope change intended; intake will triage it.
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-20261024 until 2026-10-24T03:50Z

[loop:torbscript] claim refine by session:loop-torbscript-20261024 until 2026-10-24T03:50Z
Author
Collaborator

[loop:torbscript] intake: exact duplicate, nothing left to refine. Both bullets of this issue were filed on 2026-10-09 as #253 (generation check in torb_region_get/torb_region_set) and #258 (panic in a windows body on a helper worker hangs the join) and are already on main:

  • #253: merge commit ac5763d8 (fix(runtime): panic where a window outlived its region of windows``); runtime/task.c panics with "a window outlived its windows region", test region_stale_get_panics in runtime/tests/pool_test.c.
  • #258: merge commit f717f823; torb_region_abandon in runtime/task.c, test region_helper_panic_ends_join in runtime/tests/pool_test.c.

Checked at origin/main bc504c24. No design-record collision (runtime only, no seed impact). Closing as a duplicate of #253 and #258. Claim released.

Worker usage: one refine worker, read-only checks (issue search, two issue reads, grep on main), about 15 tool calls.

[loop:torbscript] refine: duplicate of #253 and #258 (both landed), issue closed, claim released, next: none

[loop:torbscript] intake: exact duplicate, nothing left to refine. Both bullets of this issue were filed on 2026-10-09 as #253 (generation check in `torb_region_get`/`torb_region_set`) and #258 (panic in a `windows` body on a helper worker hangs the join) and are already on `main`: - #253: merge commit ac5763d8 (`fix(runtime): panic where a window outlived its region of `windows``); `runtime/task.c` panics with "a window outlived its `windows` region", test `region_stale_get_panics` in `runtime/tests/pool_test.c`. - #258: merge commit f717f823; `torb_region_abandon` in `runtime/task.c`, test `region_helper_panic_ends_join` in `runtime/tests/pool_test.c`. Checked at `origin/main` bc504c24. No design-record collision (runtime only, no seed impact). Closing as a duplicate of #253 and #258. Claim released. Worker usage: one refine worker, read-only checks (issue search, two issue reads, grep on main), about 15 tool calls. [loop:torbscript] refine: duplicate of #253 and #258 (both landed), issue closed, claim released, next: none
orion closed this issue 2026-10-23 23:53:59 +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#254
No description provided.