From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTJpp-0001Ur-3d for qemu-devel@nongnu.org; Wed, 04 Mar 2015 19:40:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTJpl-0001ky-UE for qemu-devel@nongnu.org; Wed, 04 Mar 2015 19:40:17 -0500 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:57933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTJpl-0001kn-OM for qemu-devel@nongnu.org; Wed, 04 Mar 2015 19:40:13 -0500 Message-ID: <54F7A5EB.1080209@redhat.com> Date: Wed, 04 Mar 2015 17:40:11 -0700 From: Eric Blake MIME-Version: 1.0 References: <1425378969-9677-1-git-send-email-pbonzini@redhat.com> <54F5DB5B.4070506@filoo.de> <54F5E681.3060003@redhat.com> <54F5ED16.4090803@filoo.de> <54F5F037.1000703@redhat.com> In-Reply-To: <54F5F037.1000703@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bE5hTMfrlEERbh1KL7QLpt6BXrRNaGFR2" Subject: Re: [Qemu-devel] [PATCH] vl: take iothread lock very early List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Oliver Francke , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bE5hTMfrlEERbh1KL7QLpt6BXrRNaGFR2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/03/2015 10:32 AM, Paolo Bonzini wrote: >=20 >=20 > On 03/03/2015 18:19, Oliver Francke wrote: >> >> #0 __GI_exit (status=3D1) at exit.c:104 >> #1 0x000055555575cf15 in os_daemonize () at os-posix.c:227 >> #2 0x0000555555773f2e in main (argc=3D50, argv=3D0x7fffffffe0d8, >> envp=3D0x7fffffffe270) at vl.c:3770 >> >> compiled with "--enable-debug" and in gdb "b exit". Not a coder, so if= >> this is _not_ sufficient, please give me some adivce ;) >=20 > Try removing -daemonize (hmm, that might actually fix the bug). I've confirmed that libvirt required -daemonize, and that (temporarily) removing -daemonize makes things work again. So we definitely need this.= Tested-by: Eric Blake > You > should not need "b exit", because the error is a SIGABRT and gdb stops > automatically. The fix could be something like this: >=20 > diff --git a/vl.c b/vl.c > index e1ffd0a..af61835 100644 > --- a/vl.c > +++ b/vl.c > @@ -3759,7 +3759,9 @@ int main(int argc, char **argv, char **envp) >=20 > loc_set_none(); >=20 > + qemu_mutex_unlock_iothread(); > os_daemonize(); > + qemu_mutex_lock_iothread(); >=20 > if (qemu_init_main_loop(&main_loop_err)) { > error_report_err(main_loop_err); >=20 > Paolo >=20 >=20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --bE5hTMfrlEERbh1KL7QLpt6BXrRNaGFR2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU96XrAAoJEKeha0olJ0NqwnwH/0nrxevbUHNl9ZrdjGCGUslJ 6fVNa8kqofnAeAKS4gjmUbzLTUVRF+5dVJbobZnxhUm+MxMHyuyDY1Xwe2ytfdnc lr7EOjUoQdoUuJFVYYH8uTxLVfUAyiiJcYOnw5d0+vquQEMcPI5VXtZQcnFk7j2u IXlDB9nC/6cgnRqXeqLr3hqV0wgb2GP9ml7vlP5Q59osWtimdCdDxh/qH2EFaYnF HHpKf2cdhtJ1QlROTjt1csheq5y6e64ujz4nq03yI2bjkeBF5V9LHZ2q3ilSOgbI w0iHq2hFc+yj6xQ8EjMLl06IwBXaIVUS841WyCChWN93A+Nc6Io6EHBtO5CO25Q= =ma5P -----END PGP SIGNATURE----- --bE5hTMfrlEERbh1KL7QLpt6BXrRNaGFR2--