test_gc: a sleeping thread is not woken on time while others make short sleeps
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- operating-systems
Direzione di ricerca
Start with just conformance python test_gc and the GCTests.test_trashcan_threads case, then read schedcoop_schedule and the futex-backed condition variables used for the GIL handoff. The payload suggests the stall is in that handoff, and lib/posix-poll/poll.c is where a timing-dependent change showed up. Done means test_gc passes reliably on x86 in CI and locally, and it is removed from conformance/python/known_failures.toml.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A thread sleeping in time.sleep() is not woken on time while other threads keep running short sleeps, so CPython's test_gc (GCTests.test_trashcan_threads) runs out of guest memory.
The test sleeps for 1 s in its main thread while two worker threads allocate and call time.sleep(0.000001) in a loop. The main thread then sets a flag that stops them. When its sleep overruns, the workers keep allocating until the kernel kills the guest:
ERR: [libposix_process] <deliver.c @ 640> Out of memory: killed process 2 (...)
- On
main(f74bf3d) it is intermittent:conformance (windows)crashedtest_gcon #154, 16 s in. - With the kernel of #156 it fails every time on x86, in CI (Linux, Windows) and locally (
just conformance python test_gc). That kernel's change does not touch sleeping or scheduling; a debug print inlib/posix-poll/poll.cmakes it pass again, so the failure depends on timing. - Instrumented, the main thread's
time.sleep(1.0)took 1.166 s with #156's kernel and 1.000 s withmain's.
schedcoop_schedule wakes expired sleepers on every switch, so the stall is more likely in the GIL handoff (condition variables over futexes) between the workers and the main thread.
test_gc is in conformance/python/known_failures.toml (may-fix.threading) until this is fixed.
- Lingua principale
- Rust
- Stelle
- 72
- Fork
- 14
- Merge medio
- 15h 29m
- PR unite (30g)
- 40
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 hyperlight-dev/hyperlight-unikraft
-
dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hyperlight-dev/hyperlight-unikraft#136 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
hyperlight-dev/hyperlight-unikraft#290 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
hyperlight-dev/hyperlight-unikraft#288 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
hyperlight-dev/hyperlight-unikraft#285 ·
I maintainer di solito rispondono entro 1 giorno
-
ci/nightly
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
hyperlight-dev/hyperlight-unikraft#262 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hyperlight-dev/hyperlight-unikraft
Issue simili
-
area:compat area:operations documentation ready-for-agent type:afk
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ZcashFoundation/zinder#552 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
storytold/vectorcraft#9229 ·
I maintainer di solito rispondono entro 1 giorno