RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 864780 - guest hang after second time do {"execute":"guest-suspend-disk"} s4 command
Summary: guest hang after second time do {"execute":"guest-suspend-disk"} s4 command
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-10 06:04 UTC by langfang
Modified: 2012-10-15 16:44 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-15 16:44:57 UTC
Target Upstream Version:
Embargoed:


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

Description langfang 2012-10-10 06:04:12 UTC
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 06:25:51 UTC
Created attachment 624608 [details]
second time do S4 guest Call Trace

Comment 3 Amit Shah 2012-10-10 07:00:58 UTC
Please get the entire guest call trace via serial console.

Comment 4 langfang 2012-10-10 07:10:20 UTC
Created attachment 624614 [details]
call trace log

Comment 5 Amit Shah 2012-10-10 07:50:50 UTC
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 07:51:17 UTC
Please see comment 5 for the question

Comment 7 langfang 2012-10-10 08:00:36 UTC
(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 08:07:08 UTC
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 09:10:08 UTC
(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 14:18:51 UTC
(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 16:44:57 UTC
(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.