From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSqga-0004it-1m for qemu-devel@nongnu.org; Tue, 03 Mar 2015 12:32:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSqgX-0007xL-5h for qemu-devel@nongnu.org; Tue, 03 Mar 2015 12:32:48 -0500 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]:45688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSqgW-0007xB-W9 for qemu-devel@nongnu.org; Tue, 03 Mar 2015 12:32:45 -0500 Received: by wgha1 with SMTP id a1so41513147wgh.12 for ; Tue, 03 Mar 2015 09:32:44 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54F5F037.1000703@redhat.com> Date: Tue, 03 Mar 2015 18:32:39 +0100 From: Paolo Bonzini 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> In-Reply-To: <54F5ED16.4090803@filoo.de> 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: Oliver Francke , qemu-devel@nongnu.org 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