Sibling vCPUs keep running through a MAP_SHARED overlay
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C
- Star
- 287
- Fork
- 33
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sysprog21/elfuse
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của sysprog21/elfuse
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libreswan/libreswan#3185 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
[SDL3pp] update to 0.12.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[InstCombine] 23.x folds 0.0 * (0.0 / x) to 0.0 when x may be zero (fixed on main by #202482)Đang mởllvm:instcombine
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
llvm/llvm-project#246503 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày