Bug 1455074

Summary: qemu core dump when continuouly hotplug/unplug virtserialport and virito-serial-pci in a loop
Product: Red Hat Enterprise Linux 7 Reporter: Peixiu Hou <phou>
Component: qemu-kvm-rhevAssignee: pagupta
Status: CLOSED ERRATA QA Contact: Sitong Liu <siliu>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: chayang, drjones, hhuang, juzhang, knoel, lijin, michen, phou, virt-maint, xfu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-11 00:23:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1469590, 1473046    

Description Peixiu Hou 2017-05-24 08:42:12 UTC
Description of problem:
qemu core dump when continuouly hotplug/unplug virtserialport and virito-serial-pci in a loop

Version-Release number of selected component (if applicable):
kernel-3.10.0-666.el7.x86_64
qemu-kvm-rhev-2.9.0-6.el7.x86_64
virtio-win-prewhql-137

How reproducible:
100%

Steps to Reproduce:
1.Start a VM:
/usr/libexec/qemu-kvm \
-name win2008 \
-enable-kvm -m 3G -smp 4 -cpu SandyBridge -uuid ea78071a-f6e4-4347-8077-9cb9f7953a84 \
-nodefconfig --nodefaults -boot order=cd,menu=on \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 \
-drive file=2008-32.raw,if=none,id=drive-ide0-0-1,format=raw,serial=mike_cao,cache=none -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
-drive file=/home/function_7.4/balloon/en_windows_server_2008_datacenter_enterprise_standard_sp2_x86_dvd_342333.iso,media=cdrom,id=cdrom,if=none -device ide-drive,drive=cdrom,bootindex=1 \
-netdev tap,id=hostnet0,vhost=on,vhostforce=off \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:83:66:77:88:66,bus=pci.0,addr=0x3,status=on \
-vnc 0.0.0.0:1 -vga std -monitor stdio -qmp tcp:0:4446,server,nowait \
-cdrom /home/virtio-win-prewhql-137.iso \
-device virtio-serial-pci,id=virtio-serial0,max_ports=511 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm2,bus=virtio-serial0.0,id=port2

2. In the host, continuous hotplug/unplug virtserialport and virito-serial-pci in a loop. the loop script as follows:
#!/bin/bash
# some simply scripts for balloon device hotplug/unplug in a loop
let i=0
exec 3<>/dev/tcp/localhost/4446 #note modify this to qmp port
echo -e "{ 'execute': 'qmp_capabilities' }" >&3
read response <&3
echo $response
while [ $i -lt 100 ]
do
echo -e "{ 'execute': 'device_del', 'arguments': {'id': 'port1' }}">&3 ;
sleep 3 ;
read response <&3 ;
echo "$i: $response"
echo -e "{ 'execute': 'device_del', 'arguments': {'id': 'port2' }}">&3 ;
sleep 3 ;
read response <&3 ;
echo "$i: $response"
echo -e "{'execute':'device_del','arguments':{'id':'virtio-serial0'}}">&3;
sleep 3 ;
read response <&3 ;
echo "$i: $response"
echo -e "{'execute':'device_add','arguments':{'driver':'virtio-serial-pci','id':'virtio-serial0','max_ports':511}}">&3;
sleep 3;
read response <&3;
echo "$i: $response"
echo -e "{'execute':'device_add','arguments':{'driver':'virtserialport','chardev':'channel1','name':'com.redhat.rhevm.vdsm1','bus':'virtio-serial0.0','id':'port1'}}">&3 ;
sleep 3 ;
read response <&3;
echo "$i: $response"
echo -e "{'execute':'device_add','arguments':{'driver':'virtserialport','chardev':'channel2','name':'com.redhat.rhevm.vdsm2','bus':'virtio-serial0.0','id':'port2'}}">&3 ;
sleep 3 ;
read response <&3
echo "$i: $response"
let i=$i+1
done

3. Check the host qemu monitor.

Actual results:
core dump

Expected results:
Pass

Additional info:
1. Reproduced this bug with qemu-kvm-rhev-2.9.0-6 +virtio-win-prewhql-126.
2. Cannot reproduce this bug with qemu-kvm-rhev-2.8.0-6 +virtio-win-prewhql-137.

Comment 3 lijin 2017-05-26 03:09:57 UTC
add regression keyword according to comment#0

Comment 5 pagupta 2017-10-11 06:21:34 UTC
Hello Peixiu Hou,

I see you tested with qemu-kvm-rhev-2.9.0-6. Can you please try to reproduce this with latest qemu-kvm-rhev or/& qemu-kvm-rhev version >= rhev-2.9.0-10.el7.

There is a fix for verio-serial issue went in qemu-kvm-rhev-2.9.0-10.el7.

Thanks,
Pankaj

Comment 6 Peixiu Hou 2017-10-24 08:20:16 UTC
Hi Pankaj,

Sorry for late reply, I tired to test this case with follows version:

kernel-3.10.0-691.el7.x86_64
virtio-win-prewhql-137
seabios-1.10.2-3.el7.x86_64

1. Reproduced this bug with qemu-kvm-rhev-2.9.0-5.el7.x86_64. 
2. Cannot reproduce this bug with qemu-kvm-rhev-2.9.0-14.el7.x86_64. 
3. Cannot reproduce this bug with the latest qemu-kvm-rhev-2.10.0-3.el7.x86_64.

According to above, this bug is fixed now~

Thanks a lot
Peixiu

Comment 7 pagupta 2017-10-30 08:56:06 UTC
(In reply to Peixiu Hou from comment #6)
> Hi Pankaj,
> 
> Sorry for late reply, I tired to test this case with follows version:
> 
> kernel-3.10.0-691.el7.x86_64
> virtio-win-prewhql-137
> seabios-1.10.2-3.el7.x86_64
> 
> 1. Reproduced this bug with qemu-kvm-rhev-2.9.0-5.el7.x86_64. 
> 2. Cannot reproduce this bug with qemu-kvm-rhev-2.9.0-14.el7.x86_64. 
> 3. Cannot reproduce this bug with the latest
> qemu-kvm-rhev-2.10.0-3.el7.x86_64.
> 
> According to above, this bug is fixed now~
> 
> Thanks a lot
> Peixiu

Thanks for the testing.

Pankaj

Comment 9 errata-xmlrpc 2018-04-11 00:23:04 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://access.redhat.com/errata/RHSA-2018:1104