Re: qemu_mutex deadlock with -smp 2

Darrick J. Wong
2008-01-15T20:39:59Z

On Tue, Jan 15, 2008 at 12:13:40PM -0800, Darrick J. Wong wrote:
> On Tue, Jan 15, 2008 at 05:07:46PM +0200, Avi Kivity wrote:
>
> > Are you using qcow? If so, this may be the recently-committed smp aio
> > deadlock fix. See 6bcdef5c1157bd7b526491252d20f8007ff2e9dc. Please try a
> > fresh qemu-userspace.git.
>
> qcow2, actually. qcow + fresh git seems to reduce the deadlocks, but
> not eliminate them entirely. Converting to raw fixes the problem.

Drat, raw doesn't really fix it either. Deadlock on reboot; same stack
trace as before:

(gdb) where
#0 0x00002ab011f45af8 in __lll_mutex_lock_wait () from
/lib/libpthread.so.0
#1 0x00002ab011f41ada in _L_mutex_lock_100 () from /lib/libpthread.so.0
#2 0x00002ab011f41475 in pthread_mutex_lock () from
/lib/libpthread.so.0
#3 0x000000006008c767 in kvm_eat_signal (env=0x60281640,
timeout=327644400) at /usr/local/src/kvm-userspace/qemu/qemu-kvm.c:176
#4 0x000000006008c84f in kvm_eat_signals (env=0x625944a0, timeout=0) at
/usr/local/src/kvm-userspace/qemu/qemu-kvm.c:198
#5 0x000000006008c90b in kvm_main_loop_wait (env=0x625944a0, timeout=0)
at /usr/local/src/kvm-userspace/qemu/qemu-kvm.c:219
#6 0x000000006008d0cb in kvm_main_loop_cpu (env=0x625944a0) at
/usr/local/src/kvm-userspace/qemu/qemu-kvm.c:346
#7 0x0000000060010b94 in main (argc=0, argv=0x7fff99945418) at
/usr/local/src/kvm-userspace/qemu/vl.c:7817