Concurrency: exit of N inside a spawned worker does not stop the program — with the main thread blocked in recv it hangs forever; the doc never says what a worker's exit means
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- c
- Domain
- compilers, operating-systems
Research direction
Reproduce the probes in ~/src/wt/briefs/conc-review/probes-{A,B,C}/, then inspect builtin_exit at src/builtins.c:768-782 and builtin_recv at :4743-4745. Trace channel cleanup in handle_table_drain at :5282-5299 and review docs/SPEC.md §Concurrency and docs/CONCURRENCY.md. Done means the reproduced hang is resolved or the documented worker-exit semantics are enforced, with coverage for the blocked-recv and busy-loop cases.
Written by the indexing model from the issue text.
Description
Found by the 2026-09-14 whole-runtime concurrency review (three independent reviewers, every finding below reproduced by execution on main @ a18deac unless marked reading). Probe files live in ~/src/wt/briefs/conc-review/probes-{A,B,C}/.
builtin_exit (src/builtins.c:768-782) sets the CALLING thread's flags and the state latch; nothing wakes the main thread blocked in builtin_recv's pthread_cond_wait (:4743-4745). Channels are broadcast-closed only in handle_table_drain (:5282-5299), which runs after main returns — never here.
Observed
c is channel of 1
define w() as:
usleep of 20000
exit of 5
h is spawn of w
v is recv of c
print of f"main woke: {v}"
Release: hung, killed at 20 s. Companion (main busy in a loop instead of recv): rc=3 at the end, but main printed its MARK_END AFTER the worker's exit — a worker's exit means "set the status, keep running". docs/SPEC.md §Concurrency and docs/CONCURRENCY.md ("decides its own status") never say this.
Fix direction
Either: a worker's exit closes+broadcasts every channel and sets a state flag every blocking builtin (recv, recv_timeout, thread_join, usleep) checks so main unwinds promptly; or document the real semantics ("exit from a worker records a status; the program ends when main returns") and make recv refuse to block forever when no thread can ever send (all other threads finished).
- Dominant language
- C
- Stars
- 3
- Forks
- 7
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 102
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from InauguralSystems/EigenScript
-
area:lint-tooling bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
InauguralSystems/EigenScript#1340 ·
Maintainers usually reply within 1 day
-
area:stdlib found-by:code-review kind:silent-wrong
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
InauguralSystems/EigenScript#1338 ·
Maintainers usually reply within 1 day
-
area:lint-tooling found-by:critic kind:docs-drift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
InauguralSystems/EigenScript#1335 ·
Maintainers usually reply within 1 day
-
area:ci found-by:critic kind:gate-defect
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
InauguralSystems/EigenScript#1311 ·
Maintainers usually reply within 1 day
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetOpenarea:gates found-by:critic kind:decision
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
InauguralSystems/EigenScript#1280 · 1 comment ·
Maintainers usually reply within 1 day
All issues in InauguralSystems/EigenScript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
libretro/libretro-common#233 ·
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BasedHardware/omi#19047 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
obsproject/obs-studio#13936 · 2 comments ·
Maintainers usually reply within 1 day