From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTHfA-00057u-2c for qemu-devel@nongnu.org; Wed, 04 Mar 2015 17:21:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTHf4-0007gs-IF for qemu-devel@nongnu.org; Wed, 04 Mar 2015 17:21:08 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:41606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTHf4-0007gj-8P for qemu-devel@nongnu.org; Wed, 04 Mar 2015 17:21:02 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Mar 2015 22:21:00 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4F1371B0805F for ; Wed, 4 Mar 2015 22:21:17 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t24MKxdQ5243182 for ; Wed, 4 Mar 2015 22:20:59 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t24HGCjl012337 for ; Wed, 4 Mar 2015 12:16:13 -0500 Message-ID: <54F7854A.7090406@de.ibm.com> Date: Wed, 04 Mar 2015 23:20:58 +0100 From: Christian Borntraeger 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: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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 Am 03.03.2015 um 18:32 schrieb Paolo Bonzini: > > > On 03/03/2015 18:19, Oliver Francke wrote: >> >> #0 __GI_exit (status=1) at exit.c:104 >> #1 0x000055555575cf15 in os_daemonize () at os-posix.c:227 >> #2 0x0000555555773f2e in main (argc=50, argv=0x7fffffffe0d8, >> envp=0x7fffffffe270) 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 ;) > > Try removing -daemonize (hmm, that might actually fix the bug). You > should not need "b exit", because the error is a SIGABRT and gdb stops > automatically. The fix could be something like this: > > 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) > > loc_set_none(); > > + qemu_mutex_unlock_iothread(); > os_daemonize(); > + qemu_mutex_lock_iothread(); > > if (qemu_init_main_loop(&main_loop_err)) { > error_report_err(main_loop_err); > > Paolo > This also fixes some strange issues with libvirt after qemu updates, so probably also a candidate for a quick merge. Christian