{"push_id":2473874465,"size":4,"distinct_size":4,"ref":"refs/heads/upstream-master","head":"26d6a7c87b05017ffabffb5e16837a0fccf67e90","before":"69550301ecb3f0e5b9e2cc502aecb9411cdc5816","commits":[{"sha":"c3988519c4fc3e458fbac4f7814dd775ef4a68d7","author":{"name":"Peter Xu","email":"c223ca75e606f6d9c295be0e3c74321a96fe6cd7@redhat.com"},"message":"iotests: fix wait_until_completed()\n\nIf there are more than one events, wait_until_completed() might return\nthe 2nd event even if the 1st event is JOB_COMPLETED, since the for loop\nwill continue to run even if completed is set to True.\n\nIt never happened before, but it can be triggered when OOB is enabled\ndue to the RESUME startup message. Fix that up.\n\nSigned-off-by: Peter Xu <peterx@redhat.com>\nMessage-Id: <20180408030542.17855-1-peterx@redhat.com>\nReviewed-by: Fam Zheng <famz@redhat.com>\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>\nSigned-off-by: Eric Blake <eblake@redhat.com>","distinct":true,"url":"https://api.github.com/repos/aosp-mirror/platform_external_qemu/commits/c3988519c4fc3e458fbac4f7814dd775ef4a68d7"},{"sha":"15544349277f988ea22d7037d41488de819bc92a","author":{"name":"Peter Xu","email":"c223ca75e606f6d9c295be0e3c74321a96fe6cd7@redhat.com"},"message":"iothread: workaround glib bug which hangs qmp-test\n\nFree the AIO context earlier than the GMainContext (if we have) to\nworkaround a glib2 bug that GSource context pointer is not cleared even\nif the context has already been destroyed (while it should).\n\nThe patch itself only changed the order to destroy the objects, no\nfunctional change at all. Without this workaround, we can encounter\nqmp-test hang with oob (and possibly any other use case when iothread is\nused with GMainContexts):\n\n  #0  0x00007f35ffe45334 in __lll_lock_wait () from /lib64/libpthread.so.0\n  #1  0x00007f35ffe405d8 in _L_lock_854 () from /lib64/libpthread.so.0\n  #2  0x00007f35ffe404a7 in pthread_mutex_lock () from /lib64/libpthread.so.0\n  #3  0x00007f35fc5b9c9d in g_source_unref_internal (source=0x24f0600, context=0x7f35f0000960, have_lock=0) at gmain.c:1685\n  #4  0x0000000000aa6672 in aio_context_unref (ctx=0x24f0600) at /root/qemu/util/async.c:497\n  #5  0x000000000065851c in iothread_instance_finalize (obj=0x24f0380) at /root/qemu/iothread.c:129\n  #6  0x0000000000962d79 in object_deinit (obj=0x24f0380, type=0x242e960) at /root/qemu/qom/object.c:462\n  #7  0x0000000000962e0d in object_finalize (data=0x24f0380) at /root/qemu/qom/object.c:476\n  #8  0x0000000000964146 in object_unref (obj=0x24f0380) at /root/qemu/qom/object.c:924\n  #9  0x0000000000965880 in object_finalize_child_property (obj=0x24ec640, name=0x24efca0 \"mon_iothread\", opaque=0x24f0380) at /root/qemu/qom/object.c:1436\n  #10 0x0000000000962c33 in object_property_del_child (obj=0x24ec640, child=0x24f0380, errp=0x0) at /root/qemu/qom/object.c:436\n  #11 0x0000000000962d26 in object_unparent (obj=0x24f0380) at /root/qemu/qom/object.c:455\n  #12 0x0000000000658f00 in iothread_destroy (iothread=0x24f0380) at /root/qemu/iothread.c:365\n  #13 0x00000000004c67a8 in monitor_cleanup () at /root/qemu/monitor.c:4663\n  #14 0x0000000000669e27 in main (argc=16, argv=0x7ffc8b1ae2f8, envp=0x7ffc8b1ae380) at /root/qemu/vl.c:4749\n\nThe glib2 bug is fixed in commit 26056558b (\"gmain: allow\ng_source_get_context() on destroyed sources\", 2012-07-30), so the first\ngood version is glib2 2.33.10. But we still support building with\nglib as old as 2.28, so we need the workaround.\n\nLet's make sure we destroy the GSources first before its owner context\nuntil we drop support for glib older than 2.33.10.\n\nSigned-off-by: Peter Xu <peterx@redhat.com>\nMessage-Id: <20180409083956.1780-1-peterx@redhat.com>\nReviewed-by: Eric Blake <eblake@redhat.com>\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>\nSigned-off-by: Eric Blake <eblake@redhat.com>","distinct":true,"url":"https://api.github.com/repos/aosp-mirror/platform_external_qemu/commits/15544349277f988ea22d7037d41488de819bc92a"},{"sha":"951702f39c7e31530ce4ea65b11fe25ea1ea9c37","author":{"name":"Peter Xu","email":"c223ca75e606f6d9c295be0e3c74321a96fe6cd7@redhat.com"},"message":"monitor: bind dispatch bh to iohandler context\n\nEric Auger reported the problem days ago that OOB broke ARM when running\nwith libvirt:\n\nhttp://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06231.html\n\nThe problem was that the monitor dispatcher bottom half was bound to\nqemu_aio_context now, which could be polled unexpectedly in block code.\nWe should keep the dispatchers run in iohandler_ctx just like what we\ndid before the Out-Of-Band series (chardev uses qio, and qio binds\neverything with iohandler_ctx).\n\nIf without this change, QMP dispatcher might be run even before reaching\nmain loop in block IO path, for example, in a stack like (the ARM case,\n\"cont\" command handler run even during machine init phase):\n\n        #0  qmp_cont ()\n        #1  0x00000000006bd210 in qmp_marshal_cont ()\n        #2  0x0000000000ac05c4 in do_qmp_dispatch ()\n        #3  0x0000000000ac07a0 in qmp_dispatch ()\n        #4  0x0000000000472d60 in monitor_qmp_dispatch_one ()\n        #5  0x000000000047302c in monitor_qmp_bh_dispatcher ()\n        #6  0x0000000000acf374 in aio_bh_call ()\n        #7  0x0000000000acf428 in aio_bh_poll ()\n        #8  0x0000000000ad5110 in aio_poll ()\n        #9  0x0000000000a08ab8 in blk_prw ()\n        #10 0x0000000000a091c4 in blk_pread ()\n        #11 0x0000000000734f94 in pflash_cfi01_realize ()\n        #12 0x000000000075a3a4 in device_set_realized ()\n        #13 0x00000000009a26cc in property_set_bool ()\n        #14 0x00000000009a0a40 in object_property_set ()\n        #15 0x00000000009a3a08 in object_property_set_qobject ()\n        #16 0x00000000009a0c8c in object_property_set_bool ()\n        #17 0x0000000000758f94 in qdev_init_nofail ()\n        #18 0x000000000058e190 in create_one_flash ()\n        #19 0x000000000058e2f4 in create_flash ()\n        #20 0x00000000005902f0 in machvirt_init ()\n        #21 0x00000000007635cc in machine_run_board_init ()\n        #22 0x00000000006b135c in main ()\n\nActually the problem is more severe than that.  After we switched to the\nqemu AIO handler it means the monitor dispatcher code can even be called\nwith nested aio_poll(), then it can be an explicit aio_poll() inside\nanother main loop aio_poll() which could be racy too; breaking code\nlike TPM and 9p that use nested event loops.\n\nSwitch to use the iohandler_ctx for monitor dispatchers.\n\nMy sincere thanks to Eric Auger who offered great help during both\ndebugging and verifying the problem.  The ARM test was carried out by\napplying this patch upon QEMU 2.12.0-rc0 and problem is gone after the\npatch.\n\nA quick test of mine shows that after this patch applied we can pass all\nraw iotests even with OOB on by default.\n\nCC: Eric Blake <eblake@redhat.com>\nCC: Markus Armbruster <armbru@redhat.com>\nCC: Stefan Hajnoczi <stefanha@redhat.com>\nCC: Fam Zheng <famz@redhat.com>\nReported-by: Eric Auger <eric.auger@redhat.com>\nTested-by: Eric Auger <eric.auger@redhat.com>\nSigned-off-by: Peter Xu <peterx@redhat.com>\nMessage-Id: <20180410044942.17059-1-peterx@redhat.com>\nReviewed-by: Eric Blake <eblake@redhat.com>\nReviewed-by: Stefan Hajnoczi <stefanha@redhat.com>\nSigned-off-by: Eric Blake <eblake@redhat.com>","distinct":true,"url":"https://api.github.com/repos/aosp-mirror/platform_external_qemu/commits/951702f39c7e31530ce4ea65b11fe25ea1ea9c37"},{"sha":"26d6a7c87b05017ffabffb5e16837a0fccf67e90","author":{"name":"Peter Maydell","email":"313afa09ce093b19ae1dd74f57c1ebd94508584c@linaro.org"},"message":"Merge remote-tracking branch 'remotes/ericb/tags/pull-qapi-2018-04-10' into staging\n\nqapi patches for 2018-04-10\n\n- Peter Xu: iotests: fix wait_until_completed()\n- Peter Xu: iothread: workaround glib bug which hangs qmp-test\n- Peter Xu: monitor: bind dispatch bh to iohandler context\n\n# gpg: Signature made Tue 10 Apr 2018 14:15:09 BST\n# gpg:                using RSA key A7A16B4A2527436A\n# gpg: Good signature from \"Eric Blake <eblake@redhat.com>\"\n# gpg:                 aka \"Eric Blake (Free Software Programmer) <ebb9@byu.net>\"\n# gpg:                 aka \"[jpeg image of size 6874]\"\n# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A\n\n* remotes/ericb/tags/pull-qapi-2018-04-10:\n  monitor: bind dispatch bh to iohandler context\n  iothread: workaround glib bug which hangs qmp-test\n  iotests: fix wait_until_completed()\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>","distinct":true,"url":"https://api.github.com/repos/aosp-mirror/platform_external_qemu/commits/26d6a7c87b05017ffabffb5e16837a0fccf67e90"}]}
{"actor":{"display_login":"hubot"}}