From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV5Jv-0002qf-Q8 for qemu-devel@nongnu.org; Mon, 09 Mar 2015 17:34:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YV5Js-0003aF-Fd for qemu-devel@nongnu.org; Mon, 09 Mar 2015 17:34:39 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:58874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV5Js-0003Zo-7c for qemu-devel@nongnu.org; Mon, 09 Mar 2015 17:34:36 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Mar 2015 21:34:33 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id A52941B0804B for ; Mon, 9 Mar 2015 21:34:51 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t29LYV6I7995850 for ; Mon, 9 Mar 2015 21:34:31 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t29LYVMi028462 for ; Mon, 9 Mar 2015 15:34:31 -0600 Message-ID: <54FE11E6.3060904@de.ibm.com> Date: Mon, 09 Mar 2015 22:34:30 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <54FE0A96.30907@linux.vnet.ibm.com> In-Reply-To: <54FE0A96.30907@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Crash when using -daemonize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger , qemu-devel , Paolo Bonzini , Peter Maydell Am 09.03.2015 um 22:03 schrieb Stefan Berger: > Since an upgrade to Fedora 21, I get crashes with QEMU when using -daemonize. I noticed this since libvirt could not QMP probe QEMU. > > This is the command line used: > > x86_64-softmmu/qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -M none -pidfile /tmp/foo -daemonize > > Here's the backtrace from the coredump: > > #0 0x00007fe653d5c8d7 in __GI_raise (sig=sig@entry=6) > at ../sysdeps/unix/sysv/linux/raise.c:55 > #1 0x00007fe653d5e53a in __GI_abort () at abort.c:89 > #2 0x00007fe658c4cb80 in error_exit (err=, > msg=msg@entry=0x7fe658f58580 <__func__.6036> "qemu_mutex_unlock") > at util/qemu-thread-posix.c:48 > #3 0x00007fe658edcab0 in qemu_mutex_unlock ( > mutex=mutex@entry=0x7fe6593a01c0 ) > at util/qemu-thread-posix.c:93 > #4 0x00007fe658c7a96c in qemu_mutex_unlock_iothread () > at /root/qemu/qemu-git.pt/cpus.c:1137 > #5 0x00007fe658e7695f in os_host_main_loop_wait (timeout=-1) > at main-loop.c:234 > #6 main_loop_wait (nonblocking=) at main-loop.c:494 > #7 0x00007fe658c4e82e in main_loop () at vl.c:1795 > #8 main (argc=, argv=, envp=) > at vl.c:4354 > > I am using today's tip of the QEMU git tree, but I don't think that's the actual problem. I think it is. Paolo has posted a quick fix in the thread of "vl: take iothread lock very early". Can you verify? Paolo, what is the status of this fix? 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); > > Anyone have an idea? I reinstalled glibc, but that doesn't seem to solve what looks like a mutex problem. > > Stefan > >