VMM can hang while it starts the SIGWINCH listener with --console pty
Maintainer thường phản hồi trong vòng 1 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
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, rust
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
Read vmm/src/sigwinch_listener.rs, especially start_sigwinch_listener and the TX thread local; the report identifies the child startup and parent readiness read as the hang points. Trace how the listener is spawned and how its pipe signals readiness, then check that the fix avoids the reported deadlock during startup. Done means the listener can start without hanging during restore with --console pty.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
with --console pty, the VMM can hang for good while it starts the SIGWINCH listener. we see it about once in 5500 restores.
start_sigwinch_listener (vmm/src/sigwinch_listener.rs:245 on 66b8e382d) makes the child with a raw clone3 from the vmm thread, while other threads run. the first thing the child does with its pipe is TX.with(...) (line 172). TX is a thread_local! with a destructor (line 27), so its first use registers the destructor through glibc __cxa_thread_atexit_impl, which takes dl_load_lock. if another thread held that lock at the moment of the clone, the child waits for ever: it has only one thread, and nothing releases the lock. a raw clone3 also skips the glibc fork handlers that reset such locks.
the parent then waits for ever in rx.read_exact (line 265) for the readiness byte. the API thread still accepts requests, but the vmm thread never handles them.
stacks from one hang:
- child (one thread,
vmm):futex_waiton_rtld_global+2568<-pthread_mutex_lock<-__cxa_thread_atexit_impl<- listener code - parent
vmmthread:readon the pipe - parent main thread:
pthread_joinon the vmm thread - parent
http-serverandvmm_signal_handler: idle
To Reproduce
restore a VM with --console pty in a loop, with other restores and snapshots running on the host. one hang in 5570 restores here. it is a race, so we do not have a quick reproducer.
Version
seen on our build of main with patches that do not touch this file. sigwinch_listener.rs is the same on 66b8e382d.
VM configuration
--console pty --serial off, virtio-block, virtio-net, vsock, balloon.
Host: Debian 13, kernel 6.12, glibc 2.41.
Logs
nothing after the restore request.
a fix could keep the fd in a plain static, for example an AtomicI32, so the child never registers a TLS destructor.
we found these over a long stretch of testing on our side. today an AI agent wrote up the patches and the issues in one go.
- Ngôn ngữ chính
- Rust
- Star
- 6.3k
- Fork
- 786
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 195
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 cloud-hypervisor/cloud-hypervisor
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
cloud-hypervisor/cloud-hypervisor#9562 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
cloud-hypervisor/cloud-hypervisor#9553 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
cloud-hypervisor/cloud-hypervisor#9551 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
cloud-hypervisor/cloud-hypervisor#9550 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
cloud-hypervisor/cloud-hypervisor#9528 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloud-hypervisor/cloud-hypervisor
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Choochmeque/tauri-plugin-webdriver#134 ·
Maintainer thường phản hồi trong vòng 17 ngày
-
bug(c-sdk): boxlite_box_exec does not check runtime liveness before dispatching streaming execĐang mởbug rust SDK & CLI & REST API
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
boxlite-ai/boxlite#3292 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Android bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anefzaoui/misterdownloadmanager#2516 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
editor ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
state:triage tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 89/100
agent8-cash/ethpayserver#731 ·
Maintainer thường phản hồi trong vòng 1 ngày