Bug 1144920
| Summary: | libvirtd crashed after use qemu-monitor-event --regex to a running guest | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Luyao Huang <lhuang> | ||||
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 7.1 | CC: | dyuan, eblake, hliu, mzhan, rbalakri, vivianzhang | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | libvirt-1.2.8-4.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-05 07:44:55 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: | |||||||
| Attachments: |
|
||||||
Which is smarter, ignoring the flags when 'event' is NULL, or requiring that 'event' be non-NULL when either the regex or nocase is present? I think ingoring it would be nicer than throwing an error. I'm fine with your fix as well, but the error message could be more specific (as NULL argument is allowed without the flags). Fixed upstream by:
commit b987c4c3f4829eb8a0134b687cb9748ff724f98a
Author: Ján Tomko <jtomko>
CommitDate: 2014-09-26 13:35:51 +0200
Check for NULL in qemu monitor event filter
When virConnectDomainQemuMonitorEventRegister is called with the
VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX flag,
ignore the flag instead of crashing.
https://bugzilla.redhat.com/show_bug.cgi?id=1144920
git describe: v1.2.9-rc1-16-gb987c4c
I can reproduce with build: libvirt-1.2.8-3.el7.x86_64 verify with build : libvirt-1.2.8-4.el7.x86_64 step: 1: prepare a running guest r6 2: # ps aux |grep libvirtd root 4177 0.6 0.2 1079420 23192 ? Ssl 13:15 0:06 /usr/sbin/libvirtd --listen root 5826 0.0 0.0 112644 984 pts/0 S+ 13:33 0:00 grep --color=auto libvirtd 3: run command qemu-monitor-event with --regex, then ctrl+c to quit normally # virsh qemu-monitor-event r6 --regex ^Cevent loop interrupted events received: 0 4. run command qemu-monitor-event with --regex, then destroy guest to trigger events # virsh qemu-monitor-event r6 --regex event SHUTDOWN at 1412746683.984157 for domain r6: <null> events received: 1 5. recheck libvirtd process, no crash happened # ps aux |grep libvirtd root 4177 0.6 0.2 1079420 23356 ? Ssl 13:15 0:09 /usr/sbin/libvirtd --listen root 6685 0.0 0.0 112644 984 pts/0 S+ 13:39 0:00 grep --color=auto libvirtd move to verified. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0323.html |
Created attachment 939852 [details] back trace description of problem: libvirtd crashed after use qemu-monitor-event --regex to a running guest Version-Release number of selected component (if applicable): libvirt-1.2.8-3.el7.x86_64 qemu-kvm-rhev-2.1.0-3.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare a running guest 1.# ps aux|grep libvirtd root 20077 2.2 0.2 563028 19132 ? Ssl 18:35 0:00 /usr/sbin/libvirtd root 20234 0.0 0.0 112640 968 pts/10 S+ 18:36 0:00 grep --color=auto libvirtd 2.# virsh qemu-monitor-event r6 --regex error: End of file while reading data: Input/output error error: Failed to reconnect to the hypervisor 3.# ps aux|grep libvirtd root 20239 22.0 0.2 563028 19508 ? Ssl 18:36 0:00 /usr/sbin/libvirtd root 20332 0.0 0.0 112640 972 pts/10 R+ 18:36 0:00 grep --color=auto libvirtd Actual results: libvirtd crashed after use qemu-monitor-event --regex to a running guest Expected results: Don't crash Additional info: