Sibling vCPUs keep running through a MAP_SHARED overlay
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- backend, operating-systems
Línea de trabajo
Start in src/syscall/proc.c at vcpu_handle_canceled_exit (around lines 4593–4655) and trace its EL1 and signal-delivery returns against thread_fork_barrier_check. Review hvf_apply_file_overlay_quiesced and the normal worker exit path in src/runtime/forkipc.c to understand the impact. Reproduce with the Go 1.23 workload and GOMAXPROCS=4; done means siblings stay quiesced through the overlay and the reported crashes and hangs no longer reproduce.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
thread_quiesce_siblings does not hold every sibling. The quiesce kicks each sibling with hv_vcpus_exit, but vcpu_handle_canceled_exit can return VCPU_RESUME before it reaches thread_fork_barrier_check (src/syscall/proc.c:4655). Two branches do this: the EL1 early return (:4593) and the signal-delivery branch (:4641). The kick is one-shot, and the quiesce raises no attention bit, so that sibling keeps running guest code. When the caller is hvf_apply_file_overlay_quiesced, which calls hv_vm_unmap on the segment, the sibling takes a stage-2 translation fault:
unexpected exception EC=0x20 syndrome=0x82000007 VA=0x83950 PA=0x83950
unexpected exception EC=0x20 syndrome=0x82000086 VA=0x83950 PA=0xfeff010950
The second form has S1PTW set and faults on the page-table pool.
When the faulting vCPU is a worker, its run loop stops, the thread goes through the normal exit path (src/runtime/forkipc.c:1160), and the 128 exit code is dropped. The process keeps running one thread short. A Go guest then hangs with every remaining thread in futex_wait. Linux would kill the thread group with SIGSEGV instead.
Reproduce: Go 1.23 telemetry mmaps its counter file MAP_SHARED, so any Go tool does this. On upstream main 170b5df, with golang:1.23-alpine through scripts/elfuse-oci.py, each iteration runs go env GOROOT and then gofmt -l over net, runtime and crypto and gofmt -d over fmt, with GOMAXPROCS=4:
- with
GODEBUG=schedtrace=10: 20 crash reports and 2 hangs in 59 iterations - without schedtrace: 0 in 400
- with schedtrace after
go telemetry off: 0 in 60
It is not clear why schedtrace raises the rate.
Calling thread_fork_barrier_check() at the top of vcpu_handle_canceled_exit, before the EL1 early return, gave 0 crashes in 120 iterations, and the make check unit suites pass with it. Moving the check above only the signal branch was not enough (4 crashes in 8 iterations). A kick to a vCPU that is outside hv_vcpu_run is held for the next run (checked: CANCELED within 0.002 ms), so the gap is in how the CANCELED exit is handled, not a lost kick.
- Lenguaje dominante
- C
- Estrellas
- 287
- Forks
- 33
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 18
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/elfuse
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
Todos los issues de sysprog21/elfuse
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
libreswan/libreswan#3185 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
[SDL3pp] update to 0.12.0Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
[InstCombine] 23.x folds 0.0 * (0.0 / x) to 0.0 when x may be zero (fixed on main by #202482)Abiertollvm:instcombine
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
llvm/llvm-project#246503 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día