Bug 1473121
| Summary: | virsh hang after several snapshot operations | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Haijiao Zhao <haizhao> | ||||||||
| Component: | qemu-kvm | Assignee: | David Gibson <dgibson> | ||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 7.4-Alt | CC: | dzheng, gsun, haizhao, jen, juzhang, lvivier, michen, qzhang, rbalakri, virt-maint | ||||||||
| Target Milestone: | rc | Keywords: | Reopened | ||||||||
| Target Release: | --- | ||||||||||
| Hardware: | ppc64le | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2017-08-04 09:06:45 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: |
|
||||||||||
Created attachment 1301496 [details]
qemu log
According to https://bugzilla.redhat.com/show_bug.cgi?id=1418532 live snapshot is disabled. If anybody want to close it, be my guest. Another similar scenario(*** PASS on x86_64 qemu-kvm ***):
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # list --all
Id Name State
----------------------------------------------------
- avocado-vt-vm1 shut off
- vm1 shut off
virsh # start avocado-vt-vm1
Domain avocado-vt-vm1 started
virsh # list --all
Id Name State
----------------------------------------------------
1 avocado-vt-vm1 running
- vm1 shut off
virsh # console 1
Connected to domain avocado-vt-vm1
Escape character is ^]
Red Hat Enterprise Linux Server 7.4 Beta (Pegas)
Kernel 4.11.0-13.el7a.ppc64le on an ppc64le
localhost login:
virsh #
virsh # snapshot-create-as avocado-vt-vm1 --disk-only
Domain snapshot 1501570554 created
virsh #
virsh #
virsh # snapshot-create-as avocado-vt-vm1 snap_test description
^C
**************************
While virsh is hanging, the size of image of the latest create snapshot "1501570554" is increasing, which will lead to 'no space left' for host.
Since the same test passes on x86_64 with qemu-kvm package, this looks like a problem for ppc.
Please attach the libvirtd debug log. Created attachment 1307916 [details]
log of libvirtd and qemu
I've extracted the QMP interaction between qemu and libvirt from the logs.
It looks like qemu never responds to the "savevm" command and thus libvirt never finishes the API.
This is the interaction (I'll also attach timestamps to establish the timeframe below):
[I've truncated the setup of the VM, which would not be relevant]
WRITE: mon=0x3fff7c00a6c0 buf={"execute":"cont","id":"libvirt-11"}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570487, "microseconds": 159205}, "event": "RESUME"}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570514, "microseconds": 795543}, "event": "VSERPORT_CHANGE", "data": {"open": true, "id": "channel0"}}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570515, "microseconds": 505272}, "event": "NIC_RX_FILTER_CHANGED", "data": {"name": "net0", "path": "/machine/peripheral/net0/virtio-backend"}}
WRITE: mon=0x3fff7c00a6c0 buf={"execute":"transaction","arguments":{"actions":[{"type":"blockdev-snapshot-sync","data":{"device":"drive-virtio-disk0","snapshot-file":"/var/lib/avocado/data/avocado-vt/images/jeos-25-64.1501570554","format":"qcow2"}}]},"id":"libvirt-12"}
PROCESS: mon=0x3fff7c00a6c0 buf={"return": {}, "id": "libvirt-12"}
WRITE: mon=0x3fff7c00a6c0 buf={"execute":"stop","id":"libvirt-13"}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570567, "microseconds": 873952}, "event": "STOP"}
WRITE: mon=0x3fff7c00a6c0 buf={"execute":"human-monitor-command","arguments":{"command-line":"savevm \"snap_test\""},"id":"libvirt-14"}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570567, "microseconds": 881358}, "event": "MIGRATION", "data": {"status": "setup"}}
PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570567, "microseconds": 888787}, "event": "MIGRATION_PASS", "data": {"pass": 1}}
After the last event we don't get anything else from the monitor.
Timeframe of the 'savevm' command is following:
2017-08-01 06:56:07.878+0000: 4269: info : qemuMonitorIOWrite:536 : QEMU_MONITOR_IO_WRITE: mon=0x3fff7c00a6c0 buf={"execute":"human-monitor-command","arguments":{"command-line":"savevm \"snap_test\""},"id":"libvirt-14"}
len=107 ret=107 errno=0
2017-08-01 06:56:07.889+0000: 4269: info : qemuMonitorIOProcess:431 : QEMU_MONITOR_IO_PROCESS: mon=0x3fff7c00a6c0 buf={"timestamp": {"seconds": 1501570567, "microseconds": 888787}, "event": "MIGRATION_PASS", "data": {"pass": 1}}
len=112
The two above happen almost immediately after another.
Then there's no other interaction with the monitor until the log ends.
The last entry in the log file is:
2017-08-01 07:01:52.374+0000: 4269: info : virEventPollRunOnce:640 : EVENT_POLL_RUN: nhandles=11 timeout=-1
The log file covers 5 minutes and 45 seconds. I've seen internal snapshot taking a long time, so it may be possible that this eventually finished after some more time.
I'm moving this to evaluate on the qemu side, since libvirt is not getting a response and thus the API will hang until we do get a response.
(In reply to Haijiao Zhao from comment #4) > Another similar scenario(*** PASS on x86_64 qemu-kvm ***): <...> > While virsh is hanging, the size of image of the latest create snapshot > "1501570554" is increasing, which will lead to 'no space left' for host. > Since the same test passes on x86_64 with qemu-kvm package, this looks like > a problem for ppc. Reassign. Please note savevm is considered deprecated, but unfortunately is still the default in libvirt and tools (see Bug 1402581 and Bug 1180955, for example) looks like a problem reported in BZ1470035 comment 3. Could you try qemu-kvm-2.9.0-19.el7a ? These 2 problems are all gone on environment: libvirt-3.2.0-17.el7a.ppc64le kernel-4.11.0-16.el7a.ppc64le qemu-kvm-2.9.0-19.el7a.ppc64le *** This bug has been marked as a duplicate of bug 1470035 *** |
Created attachment 1301494 [details] libvirtd log Description of problem: virsh hang after several snapshot operations Version-Release number of selected component (if applicable): kernel-4.11.0-10.el7a.ppc64le libvirt-3.2.0-15.el7a.ppc64le qemu-kvm-2.9.0-18.el7a.ppc64le How reproducible: 100% Steps to Reproduce: 1. Start virsh (.libvirt-ci-venv-avocado-remote-dGYwpa) [root@c155f1-u31 ~]# virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # start avocado-vt-vm1 Domain avocado-vt-vm1 started virsh # snapshot-create-as avocado-vt-vm1 snap-temp --disk-only Domain snapshot snap-temp created virsh # virsh # snapshot-create-as avocado-vt-vm1 snap1 --disk-only Domain snapshot snap1 created virsh # virsh # snapshot-create-as avocado-vt-vm1 snap2 --live --memspec /tmp/tmp.file Domain snapshot snap2 created virsh # virsh # snapshot-create-as avocado-vt-vm1 snap3 ^C Actual results: Hanging Expected results: Command succeed Additional info: See the attachment