Bug 856490

Summary: [virtio-win][serial]Guest failed to sleep or hibernate during virtio-serial in use
Product: Red Hat Enterprise Linux 6 Reporter: Mike Cao <bcao>
Component: virtio-winAssignee: Gal Hammer <ghammer>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: acathrow, bcao, bsarathy, mdeng, michen, rhod, vrozenfe, yvugenfi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virito-win-prewhql-49 Doc Type: Bug Fix
Doc Text:
Cause: sleep or hibernate the system while virtio-serial in use Consequence: Gust will not sleep or hibernate. Fix: In virtio serial power state management code. Result: Gust can be switched into S3/S4 mode while virtio-serial device is still in use.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 23:59:31 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:
Attachments:
Description Flags
Test Scripts none

Description Mike Cao 2012-09-12 07:00:47 UTC
Description of problem:


Version-Release number of selected component (if applicable):
2.6.32-307.el6
qemu-kvm-rhev-0.12.1.2-2-312.el6

How reproducible:
80%

Steps to Reproduce:
1.Start Guest With Virtio-serial-pci and virtserialport
CLI:/usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge -enable-kvm -m 4096 -smp 4 -name win7-ser -uuid 95f5b887-b59f-48ab-9a7c-4024e31de64b -rtc base=localtime,driftfix=slew -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -drive file=/rhev/data-center/0bbd954a-b9dd-4075-accc-73da9f3f4f9f/adeb4775-27dc-4e92-a720-6609719abd49/images/e5b7e352-5bc3-437a-8958-905019614b0e/aa772688-9948-4ffa-b50b-14c20911e73e,if=none,id=drive-ide0-0-0,format=raw,serial=e5b7e352-5bc3-437a-8958-905019614b0e,cache=none,werror=stop,rerror=stop,aio=threads -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/rhev/data-center/0bbd954a-b9dd-4075-accc-73da9f3f4f9f/7db7d438-49c0-403c-98bb-86e1eb368cbf/images/11111111-1111-1111-1111-111111111111/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw,serial= -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 -netdev tap,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=00:1a:4a:42:04:8b,bus=pci.0,addr=0x3,bootindex=3 -chardev socket,id=charchannel0,path=/tmp/tt,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.rhevm.vdsm -chardev socket,path=/tmp/tt1,server,nowait,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -chardev pty,id=charconsole0 -device virtconsole,chardev=charconsole0,id=console0 -spice port=5902,disable-ticketing -k en-us -vga qxl -global qxl-vga.vram_size=67108864 -monitor stdio -bios /usr/share/seabios/bios-pm.bin -fda /home/iso/7db7d438-49c0-403c-98bb-86e1eb368cbf/images/11111111-1111-1111-1111-111111111111/virtio-win.vfd
2.use scripts to transferring data from host to guest in a loop
3.during step2 s3 or hibernate guest
4.if doing s4 in step3 ,resume it
  
Actual results:
if doing s3 , qemu-kvm quit instead of comming into sleep state.
if doing s4 ,after step4 ,guest failed to resume


Expected results:


Additional info:

Comment 2 Vadim Rozenfeld 2012-09-12 07:16:40 UTC
Hi Mike,

Could you please post the scripts and detailed instructions how to reproduce the problem?

Thank you,
Vadim.

Comment 3 Mike Cao 2012-09-12 07:21:55 UTC
Created attachment 612016 [details]
Test Scripts

Comment 4 Mike Cao 2012-09-12 07:25:04 UTC
(In reply to comment #2)
> Hi Mike,
> 
> Could you please post the scripts and detailed instructions how to reproduce
> the problem?
> 
> Thank you,
> Vadim.

Steps:
1.Start CLI as comment #1 mentioned 
2.in the guest 
#for((;;))
do python VirtIOChannel_guest_recieve.py com.redhat.rehvm.vdsm
done

3.on the host
#for((;;))
do python serial-host-send /tmp/tt
sleep 2;
echo `uuidgen` >> a.txt
done

4 after step 3 ,sleep guest

Comment 10 Mike Cao 2012-10-24 05:07:53 UTC
Vadim/Yan ,Could you review Bug 869476?
The Actual Results is exactly same 

Best regards,
Mike

Comment 11 Vadim Rozenfeld 2012-10-24 07:38:11 UTC
(In reply to comment #10)
> Vadim/Yan ,Could you review Bug 869476?
Hi Mike,
I will check it.
Cheers,
Vadim.
> The Actual Results is exactly same 
> 
> Best regards,
> Mike

Comment 12 Gal Hammer 2012-12-20 09:53:54 UTC
I'm unable to reproduce it with version virtio-win-prewhql-0.1-49. There was a fix to a similar scenario (guest->host and not host->guest like this bug) that might solved this bug as well.

Mike, can you please test it again to confirm? Thanks.

Comment 13 Mike Cao 2013-01-21 07:33:40 UTC
(In reply to comment #12)
> I'm unable to reproduce it with version virtio-win-prewhql-0.1-49. There was
> a fix to a similar scenario (guest->host and not host->guest like this bug)
> that might solved this bug as well.
> 
> Mike, can you please test it again to confirm? Thanks.

on build49 ,Bug 882795 blocks me to verify this bug.
on Build 51 ,I did not hit this issue ,only find an new bug that is virtio-serial driver does not work after s3/s4,referring to Bug 902153.

Based on above ,this bug can be considered fixed ,

Move Status to Verified.

Comment 16 errata-xmlrpc 2013-11-21 23:59:31 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.

http://rhn.redhat.com/errata/RHBA-2013-1729.html