qemu-guest-agent shutdown never reached - hangs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Debian) |
New
|
Unknown
|
|||
qemu (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
( probably the same as https:/
package qemu-guest-agent 1:4.2-3ubuntu6.1, Ubuntu 20.04
When initiating a VM shutdown via virt-manager menu using Virtual Machine / Shutdown / Shutdown, qemu-guest-agent inside the VM hits an assert, and systemd never quite sees the unit as stopped, CPU usage springs up to 100% and shutdown does not proceed. To stop the VM, you have to use "Force Stop".
Log messages:
Jun 1 23:06:26 cvs qemu-ga: info: guest-shutdown called, mode: powerdown
Jun 1 23:06:26 cvs qemu-ga[3480]: **
=> Jun 1 23:06:26 cvs qemu-ga[3480]: ERROR:/
Jun 1 23:06:26 cvs kernel: [84364.248385] systemd[1]: qemu-guest-
=> Jun 1 23:06:26 cvs qemu-ga[3480]: Bail out! ERROR:/
Jun 1 23:06:26 cvs kernel: [84364.264870] systemd[1]: qemu-guest-
Jun 1 23:06:26 cvs systemd[1]: qemu-guest-
Jun 1 23:06:26 cvs systemd[1]: qemu-guest-
Jun 1 23:07:27 cvs kernel: [84425.268423] systemd[1]: qemu-guest-
Jun 1 23:07:27 cvs kernel: [84425.284391] systemd[1]: qemu-guest-
Jun 1 23:07:27 cvs kernel: [84425.300401] systemd[1]: qemu-guest-
Jun 1 23:07:27 cvs kernel: [84425.316382] systemd[1]: qemu-guest-
=> Jun 1 23:07:44 cvs systemd[1]: message repeated 2041319 times: [ qemu-guest-
affects: | sendmail (Ubuntu) → qemu (Ubuntu) |
Changed in qemu (Debian): | |
status: | Unknown → New |
Interesting Matthias, thanks for the report.
First I was trying to reproduce the case, taking a Focal system with the version of qemu-guest-agent you reported and then making sure it is installed, up and running:
● qemu-guest- agent.service - QEMU Guest Agent system/ qemu-guest- agent.service; static; vendor preset: enabled) slice/qemu- guest-agent. service
Loaded: loaded (/lib/systemd/
Active: active (running) since Tue 2020-06-02 05:25:04 UTC; 3min 8s ago
Main PID: 624 (qemu-ga)
Tasks: 1 (limit: 533)
Memory: 900.0K
CGroup: /system.
└─624 /usr/sbin/qemu-ga
Jun 02 05:25:04 focal systemd[1]: Started QEMU Guest Agent.
I was trailing main console, journal, dmesg and htop and passed a shutdown command through virsh.
$ virsh shutdown focal --mode agent
The guest almost immediately went down, without issues.
In fact it was so fast that none of the outputs I was tracking spit out a message like the one you reported.
I was checking the logs afterwards and found: build/qemu- 74sXTC/ qemu-4. 2/qga/main. c:532:send_ response: assertion failed: (rsp && s->channel) build/qemu- 74sXTC/ qemu-4. 2/qga/main. c:532:send_ response: assertion failed: (rsp && s->channel) agent.service: Succeeded.
Jun 02 05:25:04 focal systemd[1]: Started QEMU Guest Agent.
...
Jun 02 05:29:54 focal qemu-ga[624]: info: guest-shutdown called, mode: powerdown
Jun 02 05:29:54 focal qemu-ga[624]: **
Jun 02 05:29:54 focal qemu-ga[624]: ERROR:/
Jun 02 05:29:54 focal qemu-ga[624]: Bail out! ERROR:/
Jun 02 05:29:55 focal systemd[1]: Stopping QEMU Guest Agent...
Jun 02 05:29:55 focal systemd[1]: qemu-guest-
Jun 02 05:29:55 focal systemd[1]: Stopped QEMU Guest Agent.
So yes there seems to be an issue in regard to this assertion, but it might be a red herring for your case of being a hang on shutdown. Things work fine with it being triggered in - at least - my system.
We'll have to find what is different in yours to then cause the hang.
Would you have a guest-xml of your guest so I can try to spot differences?