qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>
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	[thread overview]
Message-ID: <564c6882-bc07-c8e1-2739-f56fad53fc4c@redhat.com> (raw)
In-Reply-To: <20180409083956.1780-1-peterx@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

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 <peterx@redhat.com>
> ---
> v2:
> - verified the root cause of the bug, and enhance commit message and
>   comments correspondingly

Reviewed-by: Eric Blake <eblake@redhat.com>

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2018-04-09 14:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09  8:39 [Qemu-devel] [PATCH for-2.12 v2] iothread: workaround glib bug which hangs qmp-test Peter Xu
2018-04-09 14:11 ` Eric Blake [this message]
2018-04-10  2:03 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564c6882-bc07-c8e1-2739-f56fad53fc4c@redhat.com \
    --to=eblake@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).