seg fault in ivshmem when using ioeventfd=on
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
qemu-kvm (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
When launching qemu with the ivshmem device and the nahanni guest server there is segmentation fault in the setup_ioeventfds function of ivshmem.c. If the ioeventfd=on flag is set the pci_ivshmem_init will call setup_ioeventfds at line 668. This function relies on the 'peers' member of the server info which is not allocated until line 669.
To reproduce you will need the nahanni guest server code. The driver code is not needed. You will also need a qcow2 or other bootable image to use for launching qemu. The error occurs before the actual image launch.
Start the nahanni ivshmem server with a small global memory space ( although the bug is not allocation specific )
ivshmem -m 1 -n 2 -p /tmp/ivshmem_socket
Next launch qemu with initialization for the ivshmem device.
qemu-system-x86_64 -hda test_iso.qcow2 -localtime -boot c -chardev socket,
If gdb is used the following error is recorded:
Program received signal SIGSEGV, Segmentation fault.
0x000055555579dd52 in setup_ioeventfds (s=0x555556619580)
at /home/genes/
367 for (j = 0; j < s->peers[
(gdb) print s->peers
$2 = (Peer *) 0x0
Changed in qemu-kvm (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in qemu-kvm (Ubuntu): | |
status: | Confirmed → Invalid |
status: | Invalid → Confirmed |
When I tried the same thing with git master (latest) I get a different error: fe_claim_ no_fail: error chardev "(null)" already used
qemu_chr_