Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,149 0 comments 0 reactions 0 assignees View on GitHub

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

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

area:concurrency bug

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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.