Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,149 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
C
Estrellas
3
Forks
7
Merge medio
3 h 56 min
PR fusionados (30 d)
102

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de InauguralSystems/EigenScript

Todos los issues de InauguralSystems/EigenScript

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.