[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.12 v2] iothread: workaround glib bug which
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.12 v2] iothread: workaround glib bug which hangs qmp-test |
Date: |
Mon, 9 Apr 2018 09:11:16 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 04/09/2018 03:39 AM, Peter Xu wrote:
> Free the AIO context earlier than the GMainContext (if we have) to
> workaround a glib2 bug that GSource context pointer is not cleared even
> if the context has already been destroyed (while it should).
>
> The patch itself only changed the order to destroy the objects, no
> functional change at all. Without this workaround, we can encounter
> qmp-test hang with oob (and possibly any other use case when iothread is
> used with GMainContexts):
>
> The glib2 bug is fixed in commit 26056558b ("gmain: allow
> g_source_get_context() on destroyed sources", 2012-07-30), the first
> good version is glib2 2.33.10. So this error will be encountered before
> any glib version older than 2.33.10 (not including). Since we are still
> supporting even older glib versions, we may want this workaround.
Grammar is awkward; I'd suggest:
...the first good version is glib2 2.33.10. But we still support
building with glib as old as 2.28, so we need the workaround.
>
> Let's make sure we destroy the GSources first before its owner context
> until we drop support for glibs older than 2.33.10.
>
> Signed-off-by: Peter Xu <address@hidden>
> ---
> v2:
> - verified the root cause of the bug, and enhance commit message and
> comments correspondingly
Reviewed-by: Eric Blake <address@hidden>
If Stefan is happy with your improved commit message, I'll queue this
for -rc3.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature