QAPI and misc patches for 2.12-rc2
The following changes since commit e5efa1f5f2d32cbfbf18ba84300736503985b593:
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2018-04-04 12:33:23 +0100)
are available in the Git repository at:
git://repo.or.cz/qemu/ericb.git tags/pull-qapi-2018-04-03-v2
for you to fetch changes up to 908cc9be8811c15abc70e1a5e1c396d9c3414d2e:
iothread: workaround glib bug which hangs qmp-test (2018-04-04 08:22:37 -0500)
In v2: add one more patch (just sending the new patch in this thread)
----------------------------------------------------------------
qapi and misc patches for 2018-04-03
- Peter Xu: monitor: bind dispatch bh to iohandler context
- Eric Blake: maint: Add .mailmap entries for patches claiming list authorship
- Eric Blake: dump: Fix build with newer gcc
- Peter Xu: iothread: workaround glib bug which hangs qmp-test
----------------------------------------------------------------
Eric Blake (2):
maint: Add .mailmap entries for patches claiming list authorship
dump: Fix build with newer gcc
Peter Xu (2):
monitor: bind dispatch bh to iohandler context
iothread: workaround glib bug which hangs qmp-test
dump.c | 4 ++-- iothread.c | 18 ++++++++++++++---- monitor.c | 2 +- .mailmap | 18 ++++++++++++++---- 4 files changed, 31 insertions(+), 11 deletions(-)
Signature · 1 line
2.14.3
[Qemu-devel] [PULL v2 4/4] iothread: workaround glib bug which hangs qmp-test
From: Peter Xu <[email protected]>
Free the AIO context earlier than the GMainContext (if we have) to workaround a possible Glib bug. No functional change at all.
We encountered a qmp-test hang with oob:
#0 0x00007f35ffe45334 in __lll_lock_wait () from /lib64/libpthread.so.0 #1 0x00007f35ffe405d8 in _L_lock_854 () from /lib64/libpthread.so.0 #2 0x00007f35ffe404a7 in pthread_mutex_lock () from /lib64/libpthread.so.0 #3 0x00007f35fc5b9c9d in g_source_unref_internal (source=0x24f0600, context=0x7f35f0000960, have_lock=0) at gmain.c:1685 #4 0x0000000000aa6672 in aio_context_unref (ctx=0x24f0600) at /root/qemu/util/async.c:497 #5 0x000000000065851c in iothread_instance_finalize (obj=0x24f0380) at /root/qemu/iothread.c:129 #6 0x0000000000962d79 in object_deinit (obj=0x24f0380, type=0x242e960) at /root/qemu/qom/object.c:462 #7 0x0000000000962e0d in object_finalize (data=0x24f0380) at /root/qemu/qom/object.c:476 #8 0x0000000000964146 in object_unref (obj=0x24f0380) at /root/qemu/qom/object.c:924 #9 0x0000000000965880 in object_finalize_child_property (obj=0x24ec640, name=0x24efca0 "mon_iothread", opaque=0x24f0380) at /root/qemu/qom/object.c:1436
#10 0x0000000000962c33 in object_property_del_child (obj=0x24ec640, child=0x24f0380, errp=0x0) at /root/qemu/qom/object.c:436 #11 0x0000000000962d26 in object_unparent (obj=0x24f0380) at /root/qemu/qom/object.c:455
#12 0x0000000000658f00 in iothread_destroy (iothread=0x24f0380) at /root/qemu/iothread.c:365
#13 0x00000000004c67a8 in monitor_cleanup () at /root/qemu/monitor.c:4663
#14 0x0000000000669e27 in main (argc=16, argv=0x7ffc8b1ae2f8, envp=0x7ffc8b1ae380) at /root/qemu/vl.c:4749
With glib version 2.28.8-9 (current default version on centos6) we might encounter above with the old code. It is verified that glib version 2.50.3-3 won't trigger that bug again, but since we are still supporting glib 2.28.8-9, we may want this workaround.
Message-Id: <[email protected]>
--- iothread.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
iothread.c +14 -4
@@ -117,16 +117,26 @@ static void iothread_instance_finalize(Object *obj)IOThread *iothread =IOTHREAD (obj);iothread_stop (iothread); +/* +* With glib version 2.28.8-9 (current default version on centos6) +* we might encounter problem of qmp-test OOB hang if we unref the +* AIO context later than the GMainContext below. Let's free the +* AIO context earlier to bypass that possible glib bug. +* +* It is verified that glib version 2.50.3-3 (or even earlier) +* won't trigger that bug again, but since we are still supporting +* glib 2.28.8-9, we need this workaround. +*/ +if (iothread->ctx) { +aio_context_unref (iothread->ctx); + iothread->ctx =NULL ; + }if (iothread->worker_context) {g_main_context_unref (iothread->worker_context); iothread->worker_context =NULL ; }qemu_cond_destroy (&iothread->init_done_cond);qemu_mutex_destroy (&iothread->init_done_lock); -if (!iothread->ctx) { -return ; - } -aio_context_unref (iothread->ctx); }static void iothread_complete (UserCreatable *obj,Error **errp)
Signature · 1 line
2.14.3
Quoted 6 lines · Eric Blake
The following changes since commit
e5efa1f5f2d32cbfbf18ba84300736503985b593:Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2018-04-04 12:33:23 +0100)
are available in the Git repository at:
Quoted 7 lines
git://repo.or.cz/qemu/ericb.gittags/pull-qapi-2018-04-03-v2for you to fetch changes up to
908cc9be8811c15abc70e1a5e1c396d9c3414d2e:iothread: workaround glib bug which hangs qmp-test (2018-04-04 08:22:37 -0500)
In v2: add one more patch (just sending the new patch in this thread)
Self-NACK - these patches are still having conversations on the list. At this point, since OOB is opt-in for 2.12, we can delay these patches to -rc3 or drop them entirely, depending on the resolution to the ongoing comments.
Quoted 24 lines
----------------------------------------------------------------
qapi and misc patches for 2018-04-03- Peter Xu: monitor: bind dispatch bh to iohandler context
- Eric Blake: maint: Add .mailmap entries for patches claiming list authorship
- Eric Blake: dump: Fix build with newer gcc
- Peter Xu: iothread: workaround glib bug which hangs qmp-test----------------------------------------------------------------
Eric Blake (2):
maint: Add .mailmap entries for patches claiming list authorship
dump: Fix build with newer gccPeter Xu (2):
monitor: bind dispatch bh to iohandler context
iothread: workaround glib bug which hangs qmp-testdump.c | 4 ++-- iothread.c | 18 ++++++++++++++---- monitor.c | 2 +- .mailmap | 18 ++++++++++++++---- 4 files changed, 31 insertions(+), 11 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org