RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1410200 - qemu gets SIGSEGV when hot-plug a vhostuser network
Summary: qemu gets SIGSEGV when hot-plug a vhostuser network
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Pei Zhang
URL:
Whiteboard:
Depends On: 1394140
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-04 18:29 UTC by Marcel Kolaja
Modified: 2017-01-17 20:11 UTC (History)
19 users (show)

Fixed In Version: qemu-kvm-rhev-2.6.0-28.el7_3.3
Doc Type: Bug Fix
Doc Text:
Hot plugging a vhostuser network device to a guest virtual machine caused the QEMU emulator to terminate unexpectedly due to access to an uninitialized chardev structure. The handling of vhostuser was improved not to access this structure if it is not initialized. As a result, the vhostuser network device can be hot plugged successfully.
Clone Of: 1394140
Environment:
Last Closed: 2017-01-17 20:11:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0115 0 normal SHIPPED_LIVE qemu-kvm-rhev bug fix update 2017-01-24 13:04:27 UTC

Description Marcel Kolaja 2017-01-04 18:29:37 UTC
This bug has been copied from bug #1394140 and has been proposed
to be backported to 7.3 z-stream (EUS).

Comment 3 Miroslav Rezanina 2017-01-04 19:35:41 UTC
Fix included in qemu-kvm-rhev-2.6.0-28.el7_3.3

Comment 5 Pei Zhang 2017-01-09 07:54:00 UTC
==Reproduce==
Versions:
3.10.0-514.6.1.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64

Steps:
1. Boot guest
/usr/libexec/qemu-kvm \
-name guest=7.3 \
-machine pc \
-cpu SandyBridge \
-m 1024 \
-smp 2,sockets=2,cores=1,threads=1 \
-object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=1073741824 \
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
-drive file=/var/lib/libvirt/images/jeos-23-64-dpdk.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait

2. Do hotplug vhostuser by qmp, qemu core dump.
{"execute":"qmp_capabilities"}
{"return": {}}

{"execute": "chardev-add","arguments": {"id": "charnet2","backend": {"type": "socket","data": {"addr": {"type": "unix","data": {"path": "/var/run/openvswitch/vhost-user1"}},"wait": false,"server": false}}},"id": "libvirt-19"}
{"return": {}, "id": "libvirt-19"

{"execute": "netdev_add","arguments": {"type": "vhost-user","chardev": "charnet2","id": "hostnet2"},"id": "libvirt-20"}
Connection closed by foreign host.

(qemu) Segmentation fault

So this bug has been reproduced.


==Verification==
3.10.0-514.6.1.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64

Steps:
1. Boot guest

2. Do hotplug vhostuser by qmp, success.
{"execute":"qmp_capabilities"}
{"return": {}}

{"execute": "chardev-add","arguments": {"id": "charnet2","backend": {"type": "socket","data": {"addr": {"type": "unix","data": {"path": "/var/run/openvswitch/vhost-user1"}},"wait": false,"server": false}}},"id": "libvirt-19"}
{"return": {}, "id": "libvirt-19"}

{"execute": "netdev_add","arguments": {"type": "vhost-user","chardev": "charnet2","id": "hostnet2"},"id": "libvirt-20"}
{"return": {}, "id": "libvirt-20"}

{"execute": "device_add", "arguments": { "driver": "virtio-net-pci", "netdev": "hostnet2", "id": "net2" } ,"id": "libvirt-21"}
{"return": {}, "id": "libvirt-21"}

In guest, the nic added is show.
# lspci | grep "Virtio network"
00:04.0 Ethernet controller: Red Hat, Inc Virtio network device

3. Do hot-unplug, nic can be removed and guest works well.
{"execute": "device_del", "arguments": { "id": "net2" } ,"id": "libvirt-21"}
{"return": {}, "id": "libvirt-21"}

{"execute": "netdev_del","arguments": {"id": "hostnet2"},"id": "libvirt-20"}
{"return": {}, "id": "libvirt-20"}

{"execute": "chardev-remove","arguments": {"id": "charnet2"},"id": "libvirt-19"}
{"return": {}, "id": "libvirt-19"}

In guest, the nic added is removed.
# lspci | grep "Virtio network"
(No output)

So this bug has been fixed well. Thanks.

Comment 6 Pei Zhang 2017-01-09 07:54:39 UTC
Set this bug "VERIFIED" as Comment 5.

Comment 8 errata-xmlrpc 2017-01-17 20:11:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0115.html


Note You need to log in before you can comment on or make changes to this bug.