From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bU9YM-0000YV-CX for qemu-devel@nongnu.org; Mon, 01 Aug 2016 05:30:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bU9YI-0005VK-1L for qemu-devel@nongnu.org; Mon, 01 Aug 2016 05:30:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bU9YH-0005V9-Rg for qemu-devel@nongnu.org; Mon, 01 Aug 2016 05:30:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C44581248 for ; Mon, 1 Aug 2016 09:30:25 +0000 (UTC) References: <1468953718-27661-1-git-send-email-armbru@redhat.com> <1468953718-27661-3-git-send-email-armbru@redhat.com> <1621526280.10219655.1470043454030.JavaMail.zimbra@redhat.com> From: Paolo Bonzini Message-ID: Date: Mon, 1 Aug 2016 11:30:17 +0200 MIME-Version: 1.0 In-Reply-To: <1621526280.10219655.1470043454030.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v2 for-2.7 02/15] qapi: change QmpInputVisitor to QSLIST List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Cc: Laszlo Ersek , Markus Armbruster , Eric Blake , Gerd Hoffmann , qemu-devel@nongnu.org, =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= On 01/08/2016 11:24, Marc-Andr=C3=A9 Lureau wrote: > Hi >=20 > ----- Original Message ----- >> >> >> On 27/07/2016 23:37, Laszlo Ersek wrote: >>> It seems to me that QEMU deadlocks when it tries to emit the >>> SPICE_DISCONNECTED event. >>> >>> (Note that I can't find "handle SPICE_DISCONNECTED" in the libvirtd l= og >>> even in the successful case (i.e., when QEMU is built at the parent o= f >>> 3d344c2aabb7).) >>> >>> Apparently audio_atexit() is triggered when QEMU is returning from >>> main() -- or calling exit() --, which somehow results in QEMU trying = to >>> send a SPICE_DISCONNECTED event through the monitor? I guess the moni= tor >>> has been long dead by then. >>> >>> Hmmm, this gives me an idea... What happens if I remove the following >>> fragment from my domain XML? >>> >>> >>>
>> function=3D'0x0'/> >>> >>> >>> Yeah, the hang disappears, shutdown works just fine. It's a spice aud= io >>> bug after all, apparently. Sorry for reporting it in this thread! :) = I'm >>> adding Gerd to the address list. >>> >>> To reiterate: this patch (commit 3d344c2aabb7) does *not* cause the >>> symptom, it only exposes an independent bug that causes the symptom. >>> And, I can work around that for now, by removing sound devices. >> >> I think the issue here is that the monitor is gone by the time >> audio_atexit is called. It is caused by commit >> c1111a24a3358ecd2f17be7c8b117cfe8bc5e5f8. >> >> The fix is to move the audio_atexit call to main before >> qemu_chr_cleanup, but I'm not sure how to deal with coreaudio_atexit. >=20 > alternatively, cleanup the monitor before cleaning up the chardev? I wa= s just looking at that, see wip patch attached. This patch is a good idea because it avoids a dangling pointer (and avoids touching the mess that is coreaudio_atexit). Paolo