Booting NT 4 disk causes /home/rjones/d/qemu/cpus.c:1580:qemu_mutex_lock_iothread: assertion failed: (!qemu_mutex_iothread_locked())
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Grab the NT 4 disk from https:/
Try to boot it as follows:
qemu-system-x86_64 -hda disk.img -cdrom Microsoft_
WARNING: Image format was not specified for 'disk.img' and probing guessed raw.
Specify the 'raw' format explicitly to remove the restrictions.
**
ERROR:/
Aborted (core dumped)
The stack trace in the failing thread is:
Thread 4 (Thread 0x7fffb0418700 (LWP 21979)):
#0 0x00007fffdd89b64b in raise () at /lib64/libc.so.6
#1 0x00007fffdd89d450 in abort () at /lib64/libc.so.6
#2 0x00007fffdff8c75d in g_assertion_message () at /lib64/
#3 0x00007fffdff8c7ea in g_assertion_
at /lib64/
#4 0x00005555557a7d00 in qemu_mutex_
at /home/rjones/
#5 0x00005555557cb429 in io_writex (env=env@
iotlbentry@
at /home/rjones/
#6 0x00005555557ce0f7 in io_writel (retaddr=
at /home/rjones/
#7 0x00005555557ce0f7 in helper_le_stl_mmu (env=env@
#8 0x000055555587c0a4 in cpu_stl_kernel_ra (env=0x55555675
#9 0x0000555555882610 in do_interrupt_
#10 0x0000555555882610 in do_interrupt_all (cpu=cpu@
#11 0x00005555558839d3 in x86_cpu_
at /home/rjones/
#12 0x00005555557d2ccb in cpu_handle_
#13 0x00005555557d2ccb in cpu_exec (cpu=cpu@
at /home/rjones/
#14 0x00005555557a855a in tcg_cpu_exec (cpu=0x55555674
at /home/rjones/
#15 0x00005555557a855a in qemu_tcg_
at /home/rjones/
#16 0x00007fffddc3d36d in start_thread () at /lib64/
#17 0x00007fffdd975b9f in clone () at /lib64/libc.so.6
Thomas Huth <email address hidden> writes:
> On 25.07.2017 11:30, Richard Jones wrote: home/rjones/ d/qemu/ cpus.c: 1580:qemu_ mutex_lock_ iothread: assertion failed: (!qemu_ mutex_iothread_ locked( )) libglib- 2.0.so. 0 message_ expr () libglib- 2.0.so. 0 lock_iothread () d/qemu/ cpus.c: 1580 entry=0x5555567 51400, iotlbentry= 0x55555675b678, entry=0x5aaaaae 40c918, val=val@entry=8, addr=addr@ entry=214853222 0, retaddr=0, retaddr@ entry=938250111 36120, size=size@entry=4) d/qemu/ accel/tcg/ cputlb. c:795 93825011136120, addr=2148532220, val=8, index=255, mmu_idx=21845, env=0x555556751400) d/qemu/ softmmu_ template. h:265 entry=0x5555567 51400, addr=addr@ entry=214853222 0, val=val@entry=8, oi=<optimized out>, retaddr= 93825011136120, retaddr@entry=0) at /home/rjones/ d/qemu/ softmmu_ template. h:300 1400, ptr=2148532220, v=8, retaddr=0) at /home/rjones/ d/qemu/ include/ exec/cpu_ ldst_template. h:182 protected (is_hw=<optimized d/qemu/ target/ i386/seg_ helper. c:758
>> ERROR:/
>> Aborted (core dumped)
>>
>> The stack trace in the failing thread is:
>>
>> Thread 4 (Thread 0x7fffb0418700 (LWP 21979)):
>> #0 0x00007fffdd89b64b in raise () at /lib64/libc.so.6
>> #1 0x00007fffdd89d450 in abort () at /lib64/libc.so.6
>> #2 0x00007fffdff8c75d in g_assertion_message () at /lib64/
>> #3 0x00007fffdff8c7ea in g_assertion_
>> at /lib64/
>> #4 0x00005555557a7d00 in qemu_mutex_
>> at /home/rjones/
>> #5 0x00005555557cb429 in io_writex (env=env@
>> iotlbentry@
>> at /home/rjones/
>> #6 0x00005555557ce0f7 in io_writel (retaddr=
>> at /home/rjones/
>> #7 0x00005555557ce0f7 in helper_le_stl_mmu (env=env@
>> #8 0x000055555587c0a4 in cpu_stl_kernel_ra (env=0x55555675
>> #9 0x0000555555882610 in do_interrupt_
>> out>, next_eip=<optimized out>, error_code=2, is_int=<optimized out>,
>> intno=<optimized out>, env=0x555556751400) at
>> /home/rjones/
Erm, what is happening here? I think the seg_helper is writing a stack
frame but for some reason to io memory, triggering the BQL. This just
seems weird.
>> #10 0x0000555555882610 in do_interrupt_all (cpu=cpu@ entry=0x5555567 49170, intno=<optimized out>, is_int=<optimized out>, error_code=2, next_eip=<optimized out>, is_hw=is_ hw@entry= 0) at /home/rjones/ d/qemu/ target/ i386/seg_ helper. c:1252 do_interrupt (cs=0x555556749170) d/qemu/ target/ i386/seg_ helper. c:1298 exception (ret=<synthetic pointer>, cpu=0x5555566a4590) at /home/rjones/ d/qemu/ accel/tcg/ cpu-exec. c:465 entry=0x5555567 49170) d/qemu/ accel/tcg/ cpu-exec. c:670 9170) d/qemu/ cpus.c: 1270 rr_cpu_ thread_ fn (arg=<optimized out>) d/qemu/ cpus.c: 1365 libpthread. so.0 cpu-exec. c around line 465 and one time in cputlb. c:795 again.
>> #11 0x00005555558839d3 in x86_cpu_
>> at /home/rjones/
>> #12 0x00005555557d2ccb in cpu_handle_
>> #13 0x00005555557d2ccb in cpu_exec (cpu=cpu@
>> at /home/rjones/
>> #14 0x00005555557a855a in tcg_cpu_exec (cpu=0x55555674
>> at /home/rjones/
>> #15 0x00005555557a855a in qemu_tcg_
>> at /home/rjones/
>> #16 0x00007fffddc3d36d in start_thread () at /lib64/
>> #17 0x00007fffdd975b9f in clone () at /lib64/libc.so.6
>
> Looks like the iothread lock is taken twice here, one time in
> accel/tcg/
> accel/tcg/
>
> If I've get that right, the locks have been added by this commit here...