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 1257409 - executing (qemu)system_powerdown causes the linux guest frozen
Summary: executing (qemu)system_powerdown causes the linux guest frozen
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1246944
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-27 03:48 UTC by Xueqiang Wei
Modified: 2016-07-25 06:11 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1246944
Environment:
Last Closed: 2016-07-25 06:11:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Xueqiang Wei 2015-08-27 03:53:45 UTC
Version-Release number of selected component (if applicable):

Host:
kernel-3.10.0-306.0.1.el7.x86_64
qemu-kvm-1.5.3-101.el7

Guest:
kernel-3.10.0-309.el7.x86_64


BTW, also hit this issue with qmp command {"execute": "system_powerdown"}

Comment 3 Xueqiang Wei 2015-08-27 11:42:47 UTC
in guest
#runlevel
N 5

 
# init 3
then (qemu) system_powerdown, not hit this issue.

Comment 5 Andrei Stepanov 2016-05-31 18:40:13 UTC
Reproducible on:
kernel-3.10.0-418.el7.x86_64
qemu-kvm-1.5.3-112.el7.x86_64

Comment 6 Amit Shah 2016-07-22 08:19:47 UTC
As comment 3 shows, this is the guest trying to do a hibernate / suspend instead of a shutdown.

Using qemu commands for effecting shutdown isn't guaranteed to produce desired results, because the guest can (and, indeed, does) influence the action on such commands.

The safest way to shutdown a guest from the host is to issue commands via libvirt, which routes through the guest agent.

Perhaps QE can update the test cases to not use the qemu commands, since what the guest does on receiving those commands is not in our control, unless those commands are routed through the guest-agent.

Comment 7 Markus Armbruster 2016-07-22 08:58:28 UTC
system_powerdown triggers a System Control Interrupt in the guest.  The guest can react to it however it likes.  As long as qemu-kvm triggers an SCI, there is no qemu-kvm bug.

Closely related: bug 980692.  It was filed against qemu-kvm with the title "fail to poweroff guest when do system_powerdown in HMP monitor if did not login guest", and reassigned to gdm with the title changed to "gdm login screen in VMs: the ACPI power button should by default effect a shutdown".  The actual bug we fixed there was the guest's reaction to SCI while gdm is running.

To double-check it's the guest's decision not to shutdown, please

* confirm that shutdown works in run level 3, and

* retest run level 5 with a guest that has bug 980692 fixed.

Additionally:

* The expected result of tests involving system_powerdown depends on the guest.  Therefore, the test plan needs to spell out how to get the guest into a defined state that reliably produces the expected result.  Please confirm the test plan does that.

* Please confirm the test plan covers the preferred way to shut down guests, namely via libvirt commands to make the guest agent shut it down.

Comment 8 Xueqiang Wei 2016-07-25 05:48:03 UTC
(In reply to Markus Armbruster from comment #7)
> system_powerdown triggers a System Control Interrupt in the guest.  The
> guest can react to it however it likes.  As long as qemu-kvm triggers an
> SCI, there is no qemu-kvm bug.
> 
> Closely related: bug 980692.  It was filed against qemu-kvm with the title
> "fail to poweroff guest when do system_powerdown in HMP monitor if did not
> login guest", and reassigned to gdm with the title changed to "gdm login
> screen in VMs: the ACPI power button should by default effect a shutdown". 
> The actual bug we fixed there was the guest's reaction to SCI while gdm is
> running.
> 
> To double-check it's the guest's decision not to shutdown, please
> 
> * confirm that shutdown works in run level 3, and
> 
> * retest run level 5 with a guest that has bug 980692 fixed.
> 
> Additionally:
> 
> * The expected result of tests involving system_powerdown depends on the
> guest.  Therefore, the test plan needs to spell out how to get the guest
> into a defined state that reliably produces the expected result.  Please
> confirm the test plan does that.
> 
> * Please confirm the test plan covers the preferred way to shut down guests,
> namely via libvirt commands to make the guest agent shut it down.


Confirmed, shutdown works in run level 3, and retested bug 980692, it has fixed.
Will confirm with feature owner and update test plan. Thank you.

Comment 9 Markus Armbruster 2016-07-25 06:11:02 UTC
Your testing confirms that QEMU works as it should.  Closing NOTABUG.


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