Bug 864780 - guest hang after second time do {"execute":"guest-suspend-disk"} s4 command
guest hang after second time do {"execute":"guest-suspend-disk"} s4 command
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 02:04 EDT by langfang
Modified: 2012-10-15 12:44 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-15 12:44:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
second time do S4 guest Call Trace (24.63 KB, image/png)
2012-10-10 02:25 EDT, langfang
no flags Details
call trace log (20.78 KB, text/plain)
2012-10-10 03:10 EDT, langfang
no flags Details

  None (edit)
Description langfang 2012-10-10 02:04:12 EDT
Description of problem:
guest will Call Trace ,when second time do S4 with qemu-ga command( {"execute":"guest-suspend-disk"})

Version-Release number of selected component (if applicable):

host:
# uname -r
2.6.32-315.el6.x86_64
rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.320.el6.x86_64
guest:
# uname -r
2.6.32-325.el6.x86_64
qemu-guest-agent-0.12.1.2-2.321.el6.x86_64


How reproducible:
10%
Steps to Reproduce:

1.boot guest with 
/usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Penryn -enable-kvm -uuid `uuidgen` -rtc base=localtime,driftfix=slew -m 8G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3-64 -drive file=/home/RHEL-Server-6.3-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,serial=zhang,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,scsi=off -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=04:1a:4a:42:0b:00,bus=pci.0,addr=0x3 -monitor stdio -boot c -qmp tcp:0:5555,server,nowait -vnc :10 -device sga -device virtio-balloon-pci,id=balloon0,bus=pci.0,id=0x6  -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device  virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0  -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0
2.Inside guest: #service qemu-ga start

3. On host:
# nc -U /tmp/qga.sock
{"execute":"guest-suspend-hybrid"}
{"error": {"class": "Unsupported", "data": {}}}
{"execute":"guest-sync"}
{"error": {"class": "InvalidParameterType", "data": {"name": "id", "expected": "integer"}}}
{"execute":"guest-suspend-ram"}--->do S3
{"execute":"guest-suspend-disk"}---->do S4
4.boot guest with same CLI
inside guest:
#service qemu-ga status
qemu-ga (pid  2227) is running ...

on host:
# nc -U /tmp/qga.sock
{"execute":"guest-sync","arguments":{"id":1234}}
{"return": 1234}
{"execute":"guest-suspend-hybrid"}
{"error": {"class": "Unsupported", "data": {}}}
{"execute":"guest-suspend-ram"}-->second time do S3
{"execute":"guest-suspend-disk"}--->second time do S4,guest hang,see the attachment about show on guest

  
Actual results:
guest hang

Expected results:

guest can be do S4 successfully

Additional info:when guest hang.

#top
Tasks: 161 total,   1 running, 160 sleeping,   0 stopped,   0 zombie
Cpu(s): 25.1%us,  0.0%sy,  0.0%ni, 74.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   7509328k total,  5932360k used,  1576968k free,    48968k buffers
Swap: 58720240k total,      628k used, 58719612k free,  3930996k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                          
 1968 root      20   0 8764m 1.5g 4408 S 101.4 21.6   2:29.89 qemu-kvm  


addinfo:
1)tried step2 to use 
#qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
(instead of "service qemu-ga start")
also have the problem
2)tried use command "echo disk >/sys/power/state" in guest ,second time do S4  not hit the problem.


attention:when guest hang ,please wait about 2 min,guest will show Call Trace.
for this issue ,tried above 10 times ,only hit 2 times.
Comment 2 langfang 2012-10-10 02:25:51 EDT
Created attachment 624608 [details]
second time do S4 guest Call Trace
Comment 3 Amit Shah 2012-10-10 03:00:58 EDT
Please get the entire guest call trace via serial console.
Comment 4 langfang 2012-10-10 03:10:20 EDT
Created attachment 624614 [details]
call trace log
Comment 5 Amit Shah 2012-10-10 03:50:50 EDT
Looks like the pm-hibernate command gets stuck wanting more RAM.  I see you have passed -m 8G to the guest; how much swap space does the guest have?
Comment 6 Amit Shah 2012-10-10 03:51:17 EDT
Please see comment 5 for the question
Comment 7 langfang 2012-10-10 04:00:36 EDT
(In reply to comment #5)
> Looks like the pm-hibernate command gets stuck wanting more RAM.  I see you
> have passed -m 8G to the guest; how much swap space does the guest have?

in guest :
# free -m
             total       used       free     shared    buffers     cached
Mem:          7744        308       7435          0          8         54
-/+ buffers/cache:        245       7498
Swap:         3967         97       3870
Comment 8 Amit Shah 2012-10-10 04:07:08 EDT
So you have more RAM than swap space.  Increase the amount of swap space to at least the amount of RAM you have.  You may need more, depending on the usage.
Comment 9 langfang 2012-10-10 05:10:08 EDT
(In reply to comment #8)
> So you have more RAM than swap space.  Increase the amount of swap space to
> at least the amount of RAM you have.  You may need more, depending on the
> usage.

amit ,thanks very much your help , boot guest  with " -m 2G",test more than 7 times ,not hit Call Trace.
Comment 10 Ademar Reis 2012-10-15 10:18:51 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > So you have more RAM than swap space.  Increase the amount of swap space to
> > at least the amount of RAM you have.  You may need more, depending on the
> > usage.
> 
> amit ,thanks very much your help , boot guest  with " -m 2G",test more than
> 7 times ,not hit Call Trace.

I believe we should close it as NOTABUG then. I was going to suggest updates in the documentation, but I think it's already documented somewhere that you need enough swap to perform S4. Amit, anything else?
Comment 11 Amit Shah 2012-10-15 12:44:57 EDT
(In reply to comment #10)
> I believe we should close it as NOTABUG then. I was going to suggest updates
> in the documentation, but I think it's already documented somewhere that you
> need enough swap to perform S4. Amit, anything else?

No, that's all.

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