runtime: NumGoroutine counts exiting goroutines, iter.TestPull flakes
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- operating-systems, testing-qa
Direzione di ricerca
Start with tinygo_task_exited in src/internal/task/task_threads.c (around line 98), where the threads scheduler stops counting an exiting goroutine, and with the GOMAXPROCS stub in src/runtime/runtime.go (around line 30). Reproduce by running the upstream iter TestPull repeatedly on the threads scheduler and watch the goroutine counts. Done means TestPull passes reliably, for example by making NumGoroutine exclude goroutines that have finished, or by making the baseline wait for them to exit.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
iter's TestPull is upstream Go's test, run unchanged from GOROOT. It failed once in CI on an unrelated PR (#6229), in the assert-stdlib-test-linux job:
https://github.com/tinygo-org/tinygo/actions/runs/42597317396/job/129094472336
--- FAIL: TestPull (0.01s)
--- FAIL: TestPull/1 (0.00s)
have 0 extra goroutines, want 1
have 0 extra goroutines, want 1
have 0 extra goroutines, want 1
have -1 extra goroutines, want 0
have -1 extra goroutines, want 0
have -1 extra goroutines, want 0
have -1 extra goroutines, want 0
have -1 extra goroutines, want 0
FAIL iter 0.030s
The first wantNG(0) passed, and every check after Pull was one low. So a goroutine that was counted in the baseline exited during the subtest.
On Linux the threads scheduler stops counting a goroutine in tinygo_task_exited. That runs after the goroutine function returns (src/internal/task/task_threads.c:98). t.Run returns as soon as the subtest goroutine signals it is done, so TestPull/0's thread can still be counted when TestPull/1 takes its baseline. Upstream stableNumGoroutine uses GOMAXPROCS(1) and Gosched to let other goroutines finish first. TinyGo ignores GOMAXPROCS (src/runtime/runtime.go:30), so on the threads scheduler the baseline can include a goroutine that is about to exit.
- Lingua principale
- Go
- Stelle
- 17.8k
- Fork
- 1.1k
- Merge medio
- 1g 4h
- PR unite (30g)
- 380
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tinygo-org/tinygo
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinygo-org/tinygo#6727 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
tinygo-org/tinygo#6711 ·
I maintainer di solito rispondono entro 1 giorno
-
Builds are not reproducible: cgo snippet paths in debug infoForse già presa @tridev-tej l’ha presa 1 giorno fa. Apertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
tinygo-org/tinygo#6619 ·
I maintainer di solito rispondono entro 1 giorno
-
Fix the targets that tinygo build -target rejectsForse già presa @narguis l’ha presa 2 giorni fa. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
tinygo-org/tinygo#6617 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
tinygo-org/tinygo#6312 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di tinygo-org/tinygo
Issue simili
-
release
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
github/gh-aw-mcpg#17603 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
oras-project/oras-go#1827 ·
I maintainer di solito rispondono entro 1 giorno
-
docs: database/sql Sessions example never commits its batch, and its "Full Example" link is a 404Apertadocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
ClickHouse/clickhouse-go#2185 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs triage receiver/podman
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
open-telemetry/opentelemetry-collector-contrib#53700 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
tagvalue.Read fails with "token too long" on lines over 64 KiBForse già presa @G26karthik l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
spdx/tools-golang#319 ·