From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQfZE-00010Q-RY for qemu-devel@nongnu.org; Wed, 25 Feb 2015 12:16:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQfZB-0000ul-Id for qemu-devel@nongnu.org; Wed, 25 Feb 2015 12:16:12 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:21904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQfZB-0000ug-Au for qemu-devel@nongnu.org; Wed, 25 Feb 2015 12:16:09 -0500 Message-ID: <54EE0352.4020700@imgtec.com> Date: Wed, 25 Feb 2015 17:16:02 +0000 From: Leon Alrae MIME-Version: 1.0 References: <1424110682-14334-1-git-send-email-pbonzini@redhat.com> <1424110682-14334-9-git-send-email-pbonzini@redhat.com> In-Reply-To: <1424110682-14334-9-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 08/21] rcu: run RCU callbacks under the BQL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Hi, On 16/02/2015 18:17, Paolo Bonzini wrote: > This needs to go away sooner or later, but one complication is the > complex VFIO data structures that are modified in instance_finalize. > Take a shortcut for now. It looks like this commit introduced a race condition. QEMU segfaults very early in one of my tests where I boot Linux, and on one of my machines it's easier to reproduce than on the others. (gdb) bt #0 0x00007ffff7b09fe3 in qemu_cpu_kick_thread (cpu=0x0) at /slave/smoketest/src/cpus.c:1045 #1 0x00007ffff7b0a269 in qemu_mutex_lock_iothread () at /slave/smoketest/src/cpus.c:1119 #2 0x00007ffff7ec5c39 in call_rcu_thread (opaque=0x0) at /slave/smoketest/src/util/rcu.c:241 #3 0x00007ffff38489d1 in start_thread () from /lib64/libpthread.so.0 #4 0x00007ffff359586d in clone () from /lib64/libc.so.6 qemu_mutex_lock_iothread() passes first_cpu to qemu_cpu_kick_thread(). Sometimes this is happening before executing cpu_exec_init(), which I believe is the reason why qemu_cpu_kick_thread() receives a null pointer. Regards, Leon