Comment 9 for bug 1712534

Revision history for this message
Juerg Haefliger (juergh) wrote :

Attached gdb to the hanging qemu-s390x-static process:

(gdb) info threads
  Id Target Id Frame
* 1 Thread 0x63a43900 (LWP 8276) "bash" __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
  2 Thread 0x7fe82c80f700 (LWP 8277) "bash" 0x000000006017fd09 in syscall ()

(gdb) bt
#0 __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x0000000060111c0d in __pthread_mutex_lock (mutex=mutex@entry=0x604eff00 <tcg_ctx+288>) at ../nptl/pthread_mutex_lock.c:80
#2 0x00000000600c46da in qemu_mutex_lock (mutex=mutex@entry=0x604eff00 <tcg_ctx+288>) at ./util/qemu-thread-posix.c:65
#3 0x0000000060032ce3 in tb_lock () at ./accel/tcg/translate-all.c:170
#4 cpu_restore_state (cpu=cpu@entry=0x63a59060, retaddr=retaddr@entry=1611863860) at ./accel/tcg/translate-all.c:353
#5 0x0000000060031078 in handle_cpu_signal (old_set=0x7ffeb1cdef68, is_write=<optimized out>, address=<optimized out>, pc=1611863858) at ./user-exec.c:124
#6 cpu_s390x_signal_handler (host_signum=<optimized out>, pinfo=pinfo@entry=0x7ffeb1cdef70, puc=0x7ffeb1cdee40) at ./user-exec.c:229
#7 0x000000006004d341 in host_signal_handler (host_signum=11, info=0x7ffeb1cdef70, puc=0x7ffeb1cdee40) at ./linux-user/signal.c:646
#8 <signal handler called>
#9 0x0000000060131732 in abort ()
#10 0x0000000060058cdd in op_risbg (s=<optimized out>, o=0x7ffeb1cdf690) at ./target/s390x/translate.c:3390
#11 0x0000000060062bf9 in translate_one (env=<optimized out>, s=0x7ffeb1cdf6c0) at ./target/s390x/translate.c:5750
#12 gen_intermediate_code (cs=cs@entry=0x63a59060, tb=tb@entry=0x6050fa40 <static_code_gen_buffer+43376>) at ./target/s390x/translate.c:5851
#13 0x0000000060032f1f in tb_gen_code (cpu=cpu@entry=0x63a59060, pc=pc@entry=274886346830, cs_base=cs_base@entry=0, flags=flags@entry=3, cflags=<optimized out>,
    cflags@entry=0) at ./accel/tcg/translate-all.c:1283
#14 0x0000000060031f79 in tb_find (tb_exit=0, last_tb=0x0, cpu=0x0) at ./accel/tcg/cpu-exec.c:367
#15 cpu_exec (cpu=cpu@entry=0x63a59060) at ./accel/tcg/cpu-exec.c:675
#16 0x0000000060034470 in cpu_loop (env=env@entry=0x63a612f0) at ./linux-user/main.c:3236
#17 0x000000006000145b in main (argc=<optimized out>, argv=0x7ffeb1ce00b8, envp=<optimized out>) at ./linux-user/main.c:4862

(gdb) frame 1
#1 0x0000000060111c0d in __pthread_mutex_lock (mutex=mutex@entry=0x604eff00 <tcg_ctx+288>) at ../nptl/pthread_mutex_lock.c:80
80 ../nptl/pthread_mutex_lock.c: No such file or directory.

(gdb) print mutex.__data
$3 = {__lock = 2, __count = 0, __owner = 8276, __nusers = 1, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}

Hmm, thread 1 is waiting on a lock that is owned by ... thread 1. Not good.