qemu linux-user crash in QOM path canonicalization during do_fork() call to cpu_create
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
Bug Description
qemu-riscv64 version 2.11.50 (v2.11.
(process:11683): GLib-CRITICAL **: g_hash_
**
ERROR:qom/
qemu:handle_
Backtrace obtained via gdb:
#0 raise (sig=sig@entry=6) at ../sysdeps/
#1 0x0000000060139b21 in abort () at abort.c:79
#2 0x0000000060100505 in g_assertion_message (domain=
func=
at gtestutils.c:2430
#3 0x0000000060100586 in g_assertion_
func=0x60214420 <__func__.18106> "object_
#4 0x0000000060098334 in object_
#5 0x0000000060098366 in object_
#6 0x000000006008e152 in device_set_realized (obj=0x7fffe813
#7 0x0000000060098bf4 in property_set_bool (obj=0x7fffe813
at qom/object.c:1926
#8 0x0000000060096fee in object_property_set (obj=0x7fffe813
#9 0x0000000060099ebd in object_
at qom/qom-
#10 0x0000000060097274 in object_
#11 0x0000000060092ec5 in cpu_create (typename=
#12 0x000000006009301a in cpu_generic_init (typename=
#13 0x000000006004cb61 in cpu_copy (env=0x7ffff008
#14 0x000000006005b79a in do_fork (env=0x7ffff008
child_
#15 0x0000000060063e56 in do_syscall (cpu_env=
arg5=
#16 0x000000006004c89f in cpu_loop (env=0x7ffff008
#17 0x000000006005b68f in clone_func (arg=0x7ffff777
#18 0x0000000060121797 in start_thread (arg=0x7ffff763
#19 0x000000006019b4fb in clone () at ../sysdeps/
Attached is a test case source code extracted from libgomp test suite.
Note that it is a multi-threaded and requires 5 or more threads to fail. Number of launched threads is controlled by OMP_NUM_THREADS evironment variable, defaulting to number of hardware threads. Changing constants in the test case makes it fail with different numbers of threads.
I will attach statically linked riscv64 binary executable if size limits permit.
| summary: |
- qemu linux-user glib hash table crash in qom/object.c + qemu linux-user crash in QOM path canonicalization during do_fork() call + to cpu_create |
| Changed in qemu: | |
| status: | Fix Committed → Fix Released |

I noticed that this crash is not target specific and it is possible to reproduce it using qemu-x86_64 with the testcase above