fix(runtime): a recovered panic in a window of windows ends the join #260
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/258-windows-panic-join"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #258
A panic in a
windowsbody under a recovery point (a task of a test on any worker, or a test's body) gives up what its thread held of a region: a claimed window counts as finished, so the join ends and the test fails with the body's panic; an opened region is closed and freed by its last running window. Design decided here: the claim is accounted per thread with a depth mark taken at each recovery point (torb_region_depth/torb_region_abandon(depth)), not per task, because a test body on the main thread is no task and resumes do not nest on one thread. Tests:region_helper_panic_ends_join,region_owner_panic_frees_slot,region_panic_after_finish_counts_onceinruntime/tests/pool_test.c, with a one-minute watchdog thread so a hang fails instead of holding CI.Seed impact: none (runtime only, no new native, no syntax, no std name the compiler looks up).
windowsends the joinChecklist (head
c497e54):region_helper_panic_ends_join,region_owner_panic_frees_slot,region_panic_after_finish_counts_oncemap 1:1 to the acceptance criteria of #258, with a watchdog so a regression fails instead of hanging CI. CI green on this head (tier A, tier B, bootstrap, gates, pdisc).torb_region_finishandtorb_region_joinlet go of their part first, so a panic afterfinishWindowcounts nothing twice. A closed region refuses further claims, and the last finishing window (or the abandon itself, if nothing is running) ends it and frees the slot exactly once. Handles have bit 63 clear (31-bit generation), soTORB_REGION_OPENEDcannot collide.torb_task_panickedandtorb_test_casetake the depth before the recovery point and abandon after the failure is recorded.Non-blocking:
windows) a panic is not given up, as documented intorb_pool.h; fine for now.windowsbody on a helper worker must not hang the join #258