Bug 1054785
Summary: | inappropriate error message when guest crashes while connecting to agent monitor | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Peter Krempa <pkrempa> | ||||
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 7.0 | CC: | acathrow, ahadas, dallan, dyuan, fjin, honzhang, iheim, istein, jdenemar, jiahu, lpeer, michal.skrivanek, mzhan, pkrempa, Rhev-m-bugs, yeylon, zhwang, zpeng | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | virt | ||||||
Fixed In Version: | libvirt-1.1.1-19.el7 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | 1047659 | Environment: | |||||
Last Closed: | 2014-06-13 12:38:31 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1047659 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Peter Krempa
2014-01-17 13:22:22 UTC
I can reproduce this bug with the reproducer in comment0 with libvirt.1.1-18, and I could get the expect error after i update the libvirt to the libvirt-1.1.1-19. so this bug can be marked verified Reproduce steps 1. rebuild the libvirtd packet as the reproducer in comment0 2. Excute the following command # virsh start rheltest2 & sleep 3; killall -9 qemu-kvm [1] 29173 error: invalid argument: monitor must not be NULL # ps aux|grep libvirtd root 14377 6.8 0.2 1127840 23560 ? Ssl 16:29 2:55 /usr/sbin/libvirtd Verify steps 1. rebuild the libvirtd packet with the reproducer in comment0 2. Excute the following command, the libvirtd didn't crash also get the expect error # virsh start rheltest2 & sleep 3; killall -9 qemu-kvm error: Failed to start domain rheltest2 error: internal error guest crashed while connecting to the guest agent # ps aux|grep libvirtd root 9784 5.1 0.0 1058464 18544 ? Sl 19:09 2:03 libvirtd --daemon 3.Start the guest,after the guest start successfully, do S4 with the guest #virsh start rheltest2 #virsh dompmsuspend rheltest2 --target disk Domain rheltest2 successfully suspended # virsh list --all Id Name State ---------------------------------------------------- - rheltest2 shut off 4.Excute the step2's command, the libvirtd didn't crash also get the expect error #virsh start rheltest2 & sleep 3; killall -9 qemu-kvm error: Failed to start domain rheltest2 error: internal error guest crashed while connecting to the guest agent # ps aux|grep libvirtd root 9784 5.1 0.0 1058464 18544 ? Sl 19:09 2:03 libvirtd --daemon 5.Start the guest, after the guest start completely, do managedsave with the guest #virsh start rheltest2 #virsh managedsave rheltest2 Domain rheltest2 state saved by libvirt 6.Excute the step2's command, the libvirtd didn't crash also get an error #virsh start rheltest2 & sleep 3; killall -9 qemu-kvm error: internal error: guest crashed while connecting to the guest agent # ps aux|grep libvirtd root 9784 5.1 0.0 1058464 18544 ? Sl 19:09 2:03 libvirtd --daemon 7.Test the upper scenario without rebuild the libvirt packet, the guest will be in shutoff status and didn't report the error, also the libvirtd didn't crash # virsh start rheltest2 & sleep 3; killall -9 qemu-kvm [1] 14584 # virsh list --all Id Name State ---------------------------------------------------- - rheltest2 shut off 8.Start the guest, then check the qemu-guest-agent's function with the following command, all the following command works as expect #virsh start rheltest2 # virsh setvcpus rheltest2 2 --guest # virsh vcpucount rheltest2 --guest 2 #virsh dompmsuspend rheltest2 --target mem #virsh dompmwakeup rheltest2 #virsh dompmsuspend rheltest2 --target disk #virsh start rheltest2 #virsh shutdown rheltest2 --mode agent #virsh reboot rheltest2 --mode agent This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. Hi Peter, I'm testing this bug on build libvirt-1.3.3-1.el7.x86_64, but I can't get this error "guest crashed while connecting to the guest agent". I'm not sure if this scenario is still testable, please have a look. Thank you. Steps: 1. Rebuild libvirt with the following change in src code: 236 agent = qemuAgentOpen(vm, 237 &config->source, 238 &agentCallbacks); 239 sleep(20); ===> add this line 240 241 virObjectLock(vm); 2. In a terminal: # tailf /var/log/libvirt/libvirtd.log|grep qemuAgentOpen 3. In another terminal: # virsh start rhel7 Domain rhel7 started 4. After this log is printed, kill qemu-kvm process: # tailf /var/log/libvirt/libvirtd.log|grep qemuAgentOpen 2016-04-14 09:37:42.343+0000: 25074: debug : qemuAgentOpen:778 : New mon 0x7f21f41fb870 fd =22 watch=122 # kill -9 qemu-kvm 5. After 20s, check libvirtd log, no "guest crashed while connecting to the guest agent" log is found. Created attachment 1147103 [details]
libvirtd log
It won't be possible at this point to get the message at the point when it would be emitted. The agent connection is now usually made in the callback handler for the VSERPORT_CHANGE event and the handler takes a job. The destroy action uses a libvirt job too so they are interlocked. With a recent enough qemu the message won't appear. |