Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 595612 - Vhost_net: Segfault occurred during guest reboot
Summary: Vhost_net: Segfault occurred during guest reboot
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-25 07:51 UTC by Amos Kong
Modified: 2015-05-25 00:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-25 09:28:42 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Amos Kong 2010-05-25 07:51:18 UTC
Description of problem:
Boot up a rhel6 guest with 'vhost=on' option, and execute 'reboot' command, segfault occurred.
When boot up with 'vhost=off' option, bug could not be reproduced. If use original option(-net tap,vlan=0,ifname=virtio_0_6001,script....), this bug doesn't exist.

Command line ('vhost=on'):
/root/vhost/client/tests/kvm/qemu -name 'vm1' -monitor tcp:0:6001,server,nowait -drive file=/root/vhost/client/tests/kvm/images/RHEL-Server-6.0-64-virtio.qcow2,if=ide,cache=none,boot=on -net nic,vlan=0,netdev=foo_6001,model=virtio,macaddr=02:A9:7C:6C:b3:74 -netdev tap,id=foo_6001,vhost=on,ifname=virtio_0_6001,script=/root/vhost/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no -m 4096 -smp 2 -soundhw ac97 -usbdevice tablet -rtc-td-hack -no-hpet -cpu qemu64,+sse2 -no-kvm-pit-reinjection -redir tcp:5000::22 -vnc :0 -serial unix:/tmp/serial-20100525-144754-R4GR,server,nowait

Original command line:
# /root/vhost/client/tests/kvm/qemu -name 'vm1' -monitor tcp:0:6001,server,nowait -drive file=/root/vhost/client/tests/kvm/images/RHEL-Server-6.0-64-virtio.qcow2,if=ide,cache=none,boot=on -net nic,vlan=0,model=virtio,macaddr=02:A9:7C:6C:b3:74 -net tap,vlan=0,ifname=virtio_0_6001,script=/root/vhost/client/tests/kvm/scripts/qemu-ifup-switch,downscript=no -m 4096 -smp 2 -soundhw ac97 -usbdevice tablet -rtc-td-hack -no-hpet -cpu qemu64,+sse2 -no-kvm-pit-reinjection -redir tcp:5000::22 -vnc :0 -serial unix:/tmp/serial-20100525-144754-R4GR,server,nowait

Version-Release number of selected component (if applicable):
guest kernel:2.6.32-22.el6.x86_64
host kernel:2.6.32-25.el6.x86_64

# rpm -qa |grep qemu

How reproducible:

Steps to Reproduce:
1.boot up a rhel6 guest with 'vhost=on' option
2.check if guest network works
# ping
3.reboot guest
# reboot
Actual results:
segfault occurred

Expected results:
guest can reboot successfully

Additional info:

1. vhost_net module has been loaded.
host)#lsmod |grep vhost_net
vhost_net              22833  1
macvtap                 7573  1 vhost_net
tun                    16295  3 vhost_net

2. core-dump:
Program received signal SIGSEGV, Segmentation fault.
event_notifier_get_fd (e=0x48) at /usr/src/debug/qemu-kvm-
38      {
(gdb) bt
#0  event_notifier_get_fd (e=0x48) at /usr/src/debug/qemu-kvm-
#1  0x00000000004208ff in virtio_pci_mask_notifier (dev=0x2d21cc0, vector=1, opaque=0x0, masked=1) at /usr/src/debug/qemu-kvm-
#2  0x000000000042b961 in msix_set_mask_notifier (dev=0x2d21cc0, vector=1, opaque=0x0) at /usr/src/debug/qemu-kvm-
#3  0x000000000041fedc in virtio_pci_set_guest_notifier (opaque=0x2d21cc0, n=0, assign=false) at /usr/src/debug/qemu-kvm-
#4  0x00000000004224cf in vhost_virtqueue_cleanup (dev=0x18a0ff0, vdev=0x2d32010, vq=0x18a1068, idx=0) at /usr/src/debug/qemu-kvm-
#5  0x00000000004228db in vhost_dev_stop (hdev=0x18a0ff0, vdev=0x2d32010) at /usr/src/debug/qemu-kvm-
#6  0x00000000004221e9 in vhost_net_stop (net=0x18a0ff0, dev=0x2d32010) at /usr/src/debug/qemu-kvm-
#7  0x000000000041f942 in virtio_net_reset (vdev=<value optimized out>) at /usr/src/debug/qemu-kvm-
#8  0x0000000000575eaf in virtio_reset (opaque=0x2d32010) at /usr/src/debug/qemu-kvm-
#9  0x0000000000420aa0 in virtio_pci_reset (d=0x2d21cc0) at /usr/src/debug/qemu-kvm-
#10 0x000000000040901a in qemu_system_reset () at /usr/src/debug/qemu-kvm-
#11 0x0000000000428291 in qemu_kvm_system_reset () at /usr/src/debug/qemu-kvm-
#12 kvm_main_loop () at /usr/src/debug/qemu-kvm-
#13 0x000000000040e10b in main_loop (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-
#14 main (argc=<value optimized out>, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-

Comment 2 Amit Shah 2010-05-25 09:28:42 UTC

*** This bug has been marked as a duplicate of bug 585940 ***

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