Bug 1259229
| Summary: | drive-mirror blocks QEMU due to lseek64() on raw image files | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Stefan Hajnoczi <stefanha> |
| Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | famz, huding, jcody, juzhang, mrezanin, mst, pezhang, virt-maint, xfu |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-rhev-2.3.0-23.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-12-04 16:55:11 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: | |||
|
Description
Stefan Hajnoczi
2015-09-02 09:08:00 UTC
*** Bug 1249883 has been marked as a duplicate of this bug. *** Fix included in qemu-kvm-rhev-2.3.0-23.el7 Summary: When I tested with qemu-kvm-rhev-2.3.0-21.el7.x86_64, the qemu is responsive, qmp monitor works well, just guest hang. Then I also tried lower version, qemu-kvm-rhev-2.3.0-12.el7.x86_64, and this bug is reproduced.
I verified this bug with qemu-kvm-rhev-2.3.0-23.el7, the results below can prove that this bug has been fixed well.
Reproduced:
1 guest hang, qemu works well
Host:
Kernel:3.10.0-315.el7.x86_64
qemu-kvm-rhev:qemu-kvm-rhev-2.3.0-21.el7.x86_64
Steps:
1.1 boot guest
/usr/libexec/qemu-kvm -name rhel6.7z -machine pc-i440fx-rhel7.2.0,accel=kvm \
-cpu SandyBridge -m 4G,slots=256,maxmem=40G -numa node \
-smp 4,sockets=2,cores=2,threads=1 \
-uuid 82b1a01e-5f6c-4f5f-8d27-3855a74e6b61 \
-netdev tap,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=12:54:00:5c:88:61 \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16 \
-vnc 0.0.0.0:1 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-serial unix:/tmp/monitor,server,nowait \
-drive file=/mnt/disk4/rhel6.7_virtio.raw,format=raw,if=none,id=drive-virtio-blk0,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-blk0,id=virtio-blk0 \
1.2 do drive-mirror, guest hang.
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) drive_mirror drive-virtio-blk0 /mnt/disk4/mirror.raw
Formatting '/mnt/disk4/mirror.raw', fmt=raw size=21474836480
(qemu)
(qemu)
(qemu)
(qemu)
(qemu) info status
VM status: running
(qemu)
(qemu)
(qemu)
(qemu) info status
VM status: running
(qemu)
1.3 query mirror job, no data is written to the target image.
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": []}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"io-status": "ok", "device": "drive-virtio-blk0", "busy": false, "len": 0, "offset": 0, "paused": false, "speed": 0, "ready": false, "type": "mirror"}]}
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"io-status": "ok", "device": "drive-virtio-blk0", "busy": false, "len": 0, "offset": 0, "paused": false, "speed": 0, "ready": false, "type": "mirror"}]}
2 guest hang, qemu hang
Host:
Kernel:3.10.0-315.el7.x86_64
qemu-kvm-rhev:qemu-kvm-rhev-2.3.0-12.el7.x86_64
Steps:
2.1 boot guest
Same command with step 1.1
2.2 do drive-mirror, qemu hang. And guest hang.
(qemu) drive_mirror drive-virtio-blk0 /mnt/disk4/mirror.raw
Formatting '/mnt/disk4/mirror.raw', fmt=raw size=21474836480
2.3 query mirror job, qmp not return, qmp monitor hang.
{ "execute" : "query-block-jobs", "arguments" : {} }
Verified:
Host:
Kernel:3.10.0-315.el7.x86_64
qemu-kvm-rhev:qemu-kvm-rhev-2.3.0-23.el7.x86_64
Prerequisites:
raw image file on ext4.
Steps:
1. boot guest
# /usr/libexec/qemu-kvm -name rhel6.7z -machine pc-i440fx-rhel7.2.0,accel=kvm \
-cpu SandyBridge -m 4G,slots=256,maxmem=40G -numa node \
-smp 4,sockets=2,cores=2,threads=1 \
-uuid 82b1a01e-5f6c-4f5f-8d27-3855a74e6b61 \
-netdev tap,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=12:54:00:5c:88:61 \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16 \
-vnc 0.0.0.0:1 \
-monitor stdio \
-qmp tcp:0:5555,server,nowait \
-serial unix:/tmp/monitor,server,nowait \
-drive file=/mnt/disk4/rhel6.7_virtio.raw,format=raw,if=none,id=drive-virtio-blk0,werror=stop,rerror=stop \
-device virtio-blk-pci,drive=drive-virtio-blk0,id=virtio-blk0 \
2. drive-mirror
(1) drive-mirror in qemu monitor, and query mirror job
(qemu) drive_mirror drive-virtio-blk0 /mnt/disk4/mirror.raw
Formatting '/mnt/disk4/mirror.raw', fmt=raw size=21474836480
{ "execute" : "query-block-jobs", "arguments" : {} }
{"return": [{"io-status": "ok", "device": "drive-virtio-blk0", "busy": true, "len": 21474967552, "offset": 11681136640, "paused": false, "speed": 0, "ready": false, "type": "mirror"}]}
{"timestamp": {"seconds": 1442368656, "microseconds": 681306}, "event": "BLOCK_JOB_READY", "data": {"device": "drive-virtio-blk0", "len": 21475360768, "offset": 21475360768, "speed": 0, "type": "mirror"}}
(2)reopen
{"execute": "block-job-complete", "arguments": { "device": "drive-virtio-blk0"} }
{"return": {}}
{"timestamp": {"seconds": 1442368751, "microseconds": 886669}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-virtio-blk0", "len": 21477588992, "offset": 21477588992, "speed": 0, "type": "mirror"}}
(qemu) info block
drive-virtio-blk0: /mnt/disk4/mirror.raw (raw)
Cache mode: writeback
...
3. qemu and guest both work well. After reboot guest sever times, they still work well.
I also tried xfs, it works well. So this bug is fixed.
*** Bug 1263046 has been marked as a duplicate of this bug. *** 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/RHBA-2015-2546.html |