mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
When starting a dummy QEMU process with virsh version, monitor_init_qmp() enables IOThread monitoring of the QMP fd by default. However, a race condition exists during the initialization phase: the IOThread only removes the main thread's fd watch when it reaches qio_net_listener_set_client_func_full(), which may be delayed under high system load. This creates a window between monitor_qmp_setup_handlers_bh() and qio_net_listener_set_client_func_full() where both the main thread and IOThread are simultaneously monitoring the same fd and processing events. This race can cause either the main thread or the IOThread to hang and become unresponsive. Fix this by proactively cleaning up the listener's IO sources in monitor_init_qmp() before the IOThread initializes QMP monitoring, ensuring exclusive fd ownership and eliminating the race condition. Signed-off-by: Jie Song <songjie_yewu@cmss.chinamobile.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20251125140706.114197-1-mail@jiesong.me> |
1 week ago | |
|---|---|---|
| .. | ||
| char-fd.h | 4 months ago | |
| char-fe.h | 3 months ago | |
| char-io.h | 1 week ago | |
| char-parallel.h | 9 years ago | |
| char-serial.h | 9 years ago | |
| char-socket.h | 1 year ago | |
| char-win-stdio.h | 9 years ago | |
| char-win.h | 5 years ago | |
| char.h | 1 week ago | |
| spice.h | 5 years ago | |