** Description changed:

- It is not yet sure if this triggers a functional issue, but it certainly
- looks wrong and might trigger a crash dump & report.
+ [Impact]
  
- Taking a Focal system with the version of qemu-guest-agent you reported
- and then making sure it is installed, up and running:
+  * On shutdown the qemu-guest-agent crashes, that will
+    - trigger the crash reports
+    - throw two errors/warnings into the logs
+    - can cause hang (not seen in all cases)
+ 
+  * Since generally the shutdown seems to still work it is "only" medium, 
+    maybe high in prio. But really should be resolved to avoid that we find 
+    even more severe consequences (like bad guest state tracking into hard 
+    kills, I can imagine these)
+ 
+  * After outlining the issue above the fix was cerated and is rather small 
+    and easy. It applies to E-G as-is.
+ 
+ [Test Case]
+ 
+ * Create a guest VM with the target release you want to test.
+   Ensure you have the channel for gueqt-agent set up and making sure it is 
+   installed, up and running:
  
  ● qemu-guest-agent.service - QEMU Guest Agent
-      Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static; 
vendor preset: enabled)
-      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.slice/qemu-guest-agent.service
-              └─624 /usr/sbin/qemu-ga
+      Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static; 
vendor preset: enabled)
+      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.slice/qemu-guest-agent.service
+              └─624 /usr/sbin/qemu-ga
  
- Pass a shutdown command through virsh:
-   $ virsh shutdown focal --mode agent
+ * Pass a shutdown command through virsh:
+     $ virsh shutdown focal --mode agent
+   An alternative way to trigger the same is:
+     $ virsh qemu-agent-command focal '{"execute": "guest-shutdown"}'
  
- The guest almost immediately went down, without "functional" issues.
- But when checking the logs later I found:
- Jun 02 05:29:54 focal qemu-ga[624]: 
ERROR:/build/qemu-74sXTC/qemu-4.2/qga/main.c:532:send_response: assertion 
failed: (rsp && s->channel)
- Jun 02 05:29:54 focal qemu-ga[624]: Bail out! 
ERROR:/build/qemu-74sXTC/qemu-4.2/qga/main.c:532:send_response: assertion 
failed: (rsp && s->channel)
+ 
+ The guest almost immediately went down usually, but on reboot you can check 
the journal of the service and will find the crashes:
+   $ journalctl -u qemu-guest-agent
+   Jun 02 05:29:54 focal qemu-ga[624]: 
ERROR:/build/qemu-74sXTC/qemu-4.2/qga/main.c:532:send_response: assertion 
failed: (rsp && s->channel)
+   Jun 02 05:29:54 focal qemu-ga[624]: Bail out! 
ERROR:/build/qemu-74sXTC/qemu-4.2/qga/main.c:532:send_response: assertion 
failed: (rsp && s->channel)
+ 
+ 
+ [Regression Potential] 
+ 
+  * Formerly qemu was asserting on a bad pointer and exiting non gracefully.
+    That is replaced by a clean handling of the case. The different return 
+    path will slightly change behavior - to the better. I can't see an issue 
+    that would likely happen - but never the less if we look for regressions 
+    they will be on the guest shutdown path.
+ 
+ [Other Info]
+  
+  * Hangs got reported by affected users, but yet unable to be reproduced on
+    other systems.
+ 
  
  ---
  
  Completely new/fresh focal / mate install.  Crash during initial apt install 
of many packages after first log-in, including qemu-guest-agent.   No other 
important load other than apt running. OS running in a vm as a guest 
(obviously...)  No idea what caused it.  Including crash report.
   VM was 2 penryn class cpus with 3G ram.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: qemu-guest-agent 1:4.2-3ubuntu6
  ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
  Uname: Linux 5.4.0-29-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27
  Architecture: amd64
  CasperMD5CheckResult: skip
  CurrentDesktop: MATE
  Date: Fri May 15 13:20:02 2020
  InstallationDate: Installed on 2020-05-13 (1 days ago)
  InstallationMedia: Ubuntu-MATE 20.04 LTS "Focal Fossa" - Release amd64 
(20200423)
  SourcePackage: qemu
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1878973

Title:
  clean focal install,  crash report qemu-guest-agent

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1878973/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to