Bug 1333697

Summary: qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/virtio-scsi.c:724: virtio_scsi_push_event: Assertion `event == 0' failed
Product: Red Hat Enterprise Linux 6 Reporter: Yanan Fu <yfu>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: Xueqiang Wei <xuwei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: aliang, chayang, coli, hachen, jen, juzhang, meyang, michen, mkenneth, ngu, pingl, rbalakri, virt-bugs, virt-maint, xuwei
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.496.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 09:38:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1359965    
Attachments:
Description Flags
add debug log for this issue none

Description Yanan Fu 2016-05-06 07:43:17 UTC
Created attachment 1154503 [details]
add debug log for this issue

Description of problem:
Hit this issue when run autotest case:
multi_disk_random_hotplug.parallel.single_type: hot plug/unplug multi virtio disks.

This issue only exist with virtio-scsi disk, can not reproduce with virtio-blk disk in my test.

python command line:
python ConfigTest.py --testcase=multi_disk_random_hotplug.parallel.single_type --guestname=RHEL.6.8 --platform=x86_64 --nicmodel=virtio_net --driveformat=virtio_blk,virtio_scsi --imageformat=qcow2 --display=spice --nrepeat=3

Version-Release number of selected component (if applicable):
host kernel:kernel-2.6.32-642.el6.x86_64
qemu: qemu-kvm-rhev-0.12.1.2-2.491.el6_8.1.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with 4 qmp and 2 hmp monitor.
2.create 20 qcow2 images in host, sg0,sg1,...sg19
3.6 thread to do device add/del virtio-scsi disk: scsi-hd

Th0: works with ['drive_stg0', 'stg0', 'drive_stg6', 'stg6', 'drive_stg12', 'stg12', 'drive_stg18', 'stg18'] devices

Th1: works with ['drive_stg1', 'stg1', 'drive_stg7', 'stg7', 'drive_stg13', 'stg13', 'drive_stg19', 'stg19'] devices

Th2: works with ['drive_stg2', 'stg2', 'drive_stg8', 'stg8', 'drive_stg14', 'stg14'] devices

Th3: works with ['drive_stg3', 'stg3', 'drive_stg9', 'stg9', 'drive_stg15', 'stg15'] devices

Th4: works with ['drive_stg4', 'stg4', 'drive_stg10', 'stg10', 'drive_stg16', 'stg16'] devices

Th5: works with ['drive_stg5', 'stg5', 'drive_stg11', 'stg11', 'drive_stg17', 'stg17'] devices

{'execute': '__com.redhat_drive_add', 'arguments': OrderedDict([('id', 'drive_stg0'), ('file', '/home/autotest/client/tests/virt/shared/data/images/stg0')]), 'id': 'U0OMwXx6'}
{'execute': 'device_add', 'arguments': OrderedDict([('driver', 'scsi-hd'), ('id', 'stg0'), ('drive', 'drive_stg0'), ('bus', 'virtio_scsi_pci0.0'), ('scsi-id', 1), ('lun', 0)]), 'id': 'WT5gc0IQ'}

during device_add:
[qemu output] qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/virtio-scsi.c:724: virtio_scsi_push_event: Assertion `event == 0' failed.

Actual results:
generate core file when do hot plug.

Expected results:
guest should work well,and the case can finish with GOOD status.

Additional info:
CLI:
/usr/libexec/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1' \
    -machine rhel6.6.0  \
    -nodefaults  \
    -vga qxl \
    -device AC97,bus=pci.0,addr=03  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=hmp_id_TestHMP1,path=/tmp/monitor-TestHMP1-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=hmp_id_TestHMP1,mode=readline  \
    -chardev socket,id=hmp_id_TestHMP2,path=/tmp/monitor-TestHMP2-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=hmp_id_TestHMP2,mode=readline  \
    -chardev socket,id=qmp_id_TestQMP1,path=/tmp/monitor-TestQMP1-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=qmp_id_TestQMP1,mode=control  \
    -chardev socket,id=qmp_id_TestQMP2,path=/tmp/monitor-TestQMP2-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=qmp_id_TestQMP2,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20160506-031439-SR4ykqFq,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=idvWbnKv  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20160506-031439-SR4ykqFq,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20160506-031439-SR4ykqFq,path=/tmp/seabios-20160506-031439-SR4ykqFq,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20160506-031439-SR4ykqFq,iobase=0x402 \
    -device ich9-usb-ehci1,id=usb1,addr=1d.7,multifunction=on,bus=pci.0 \
    -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=1d.0,firstport=0,bus=pci.0 \
    -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=1d.2,firstport=2,bus=pci.0 \
    -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=1d.4,firstport=4,bus=pci.0 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=04 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/home/autotest/client/tests/virt/shared/data/images/RHEL-Server-6.8-64-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1,bootindex=0 \
    -device virtio-net-pci,mac=9a:31:32:33:34:35,id=idmGIfU2,vectors=4,netdev=idotjuwb,bus=pci.0,addr=05  \
    -netdev tap,id=idotjuwb,vhost=on,vhostfd=23,fd=22  \
    -m 8192  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
    -cpu 'SandyBridge' \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -spice port=3000,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm

job link:
http://10.66.4.244/kvm_autotest_job_log/?jobid=1329722

Comment 4 Fam Zheng 2016-10-26 00:56:09 UTC
*** Bug 1333294 has been marked as a duplicate of this bug. ***

Comment 7 Yash Mankad 2016-11-04 16:13:22 UTC
Fix included in qemu-kvm-0.12.1.2-2.496.el6

Comment 9 Xueqiang Wei 2016-11-24 06:27:00 UTC
reproduce this issue on below version:
host kernel:kernel-2.6.32-642.el6.x86_64
qemu: qemu-kvm-rhev-0.12.1.2-2.491.el6_8.1.x86_64

This issue only exist with virtio-scsi disk, not hit with virtio-blk disk
And coredump report like below:

Program: /usr/libexec/qemu-kvm
PID: 56305
Signal: 6
Hostname: ibm-x3850x6-04.lab.eng.pek2.redhat.com
Time of the crash (according to kernel): Fri May  6 03:15:31 2016
Program backtrace:
Missing separate debuginfo for 
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/ec/37397b4ecc9f347891ceff84a05131bf10bfc3
[New Thread 56305]
[New Thread 56312]
[New Thread 56482]
[New Thread 56311]
[New Thread 56314]
[New Thread 56313]
[New Thread 56316]
[New Thread 56318]
[New Thread 56315]
[New Thread 56321]
[New Thread 56317]
[Thread debugging using libthread_db enabled]
Core was generated by `/usr/libexec/qemu-kvm -S -name virt-tests-vm1 -machine rhel6.6.0 -nodefaults -v'.
Program terminated with signal 6, Aborted.
#0  0x00007fbaccfe65e5 in raise () from /lib64/libc.so.6
#0  0x00007fbaccfe65e5 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007fbaccfe7dc5 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007fbaccfdf70e in __assert_fail_base () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007fbaccfdf7d0 in __assert_fail () from /lib64/libc.so.6
No symbol table info available
.
.
.


retest on the latest version:
host: kernel-2.6.32-667.el6.x86_64
qemu: qemu-kvm-rhev-0.12.1.2-2.496.el6

not hit this issue with virtio-scsi disk and with virtio-blk disk, so change bug status to verified.

Comment 11 errata-xmlrpc 2017-03-21 09:38:38 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/RHSA-2017-0621.html