fork quiesce barrier can be bypassed
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- c, macos
- Bereich
- backend, operating-systems
Rechercherichtung
Start with thread_quiesce_siblings and thread_fork_barrier_check, then read src/syscall/proc.c around handle_canceled and the thread_exec_de_thread comment. Trace the exit and run-loop paths for each described kick timing, plus the case where a sibling remains parked across fork windows. Done means siblings reliably park before snapshots and back-to-back forks no longer wait for the 100 ms timeout.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
fork quiesce barrier can be bypassed, so the snapshot runs beside a live sibling
thread_quiesce_siblings kicks every sibling with hv_vcpus_exit and waits up to 100 ms for each to reach thread_fork_barrier_check. That check only runs in the CANCELED exit handler (src/syscall/proc.c, handle_canceled), so a kicked sibling can return to guest code without parking:
- The kick lands while the sibling is in a host syscall. As the thread_exec_de_thread comment notes, such a kick is lost, and the run loop top has no fork check before hv_vcpu_run.
- The kick lands at EL1, and the handler returns VCPU_RESUME before the barrier.
- A signal is pending, and the handler delivers it and returns VCPU_RESUME before the barrier.
The forker then times out and takes the snapshot while that sibling keeps running guest code, although the barrier comment says the quiet is load-bearing.
Reproduction: one sibling loops on nanosleep(200us) while the main thread calls fork() repeatedly and times each call (macOS 15.4.1, Apple M4, median of 21):
sibling in compute loop: fork() 13 ms
sibling in nanosleep loop: fork() 112 ms (every fork hits the 100 ms timeout)
A smaller issue in the same code: if a sibling is still parked from the previous fork window, it is counted again when the next one arms and never answers, so back-to-back forks each pay the 100 ms timeout.
- Vorherrschende Sprache
- C
- Sterne
- 287
- Forks
- 33
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 18
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sysprog21/elfuse
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in sysprog21/elfuse
Ähnliche Issues
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
yugabyte/yugabyte-db#39462 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
libreswan/libreswan#3185 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
category:port-update
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 2 Tagen