Hi Markus

On Mon, Dec 1, 2025 at 10:00 AM Markus Armbruster <[email protected]> wrote:
>
> Jie Song, Marc-André, is this bug serious enough and the fix safe enough
> to still go into 10.2?
>

My feeling is that it's a bit late for 10.2, as I suppose this bug has
been present for a long time and the risk of regression is high. Also
not enough people reviewed it.

> Jie Song <[email protected]> writes:
>
> > From: Jie Song <[email protected]>
> >
> > 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 <[email protected]>
> > Reviewed-by: Marc-André Lureau <[email protected]>
>


-- 
Marc-André Lureau

Reply via email to