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
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- c
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 3時間 56分
- マージ済み PR(30日)
- 102
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:lint-tooling bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1340 ·
メンテナーはふだん 1 日以内に返信
-
area:stdlib found-by:code-review kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1338 ·
メンテナーはふだん 1 日以内に返信
-
area:lint-tooling found-by:critic kind:docs-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InauguralSystems/EigenScript#1335 ·
メンテナーはふだん 1 日以内に返信
-
area:ci found-by:critic kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#1311 ·
メンテナーはふだん 1 日以内に返信
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetオープンarea:gates found-by:critic kind:decision
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
InauguralSystems/EigenScript#1280 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
johnsonjh/emu2-cpm86#68 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Zenmap CrashオープンZenmap
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
fastfetch-cli/fastfetch#2619 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Template: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
betaflight/betaflight#15759 ·
メンテナーはふだん 1 日以内に返信