Bug 1362084
Summary: | qemu core dump when do blockdev-add with option detect-zeroes on | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Qianqian Zhu <qizhu> |
Component: | qemu-kvm-rhev | Assignee: | Markus Armbruster <armbru> |
Status: | CLOSED ERRATA | QA Contact: | Qianqian Zhu <qizhu> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.3 | CC: | areis, armbru, chayang, famz, jinzhao, juzhang, knoel, meyang, mrezanin, virt-maint |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
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-01 23:32:13 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: | |||
Bug Blocks: | 963588 |
Description
Qianqian Zhu
2016-08-01 09:35:34 UTC
blockdev-add API is still experimental upstream and not supported by libvirt. But instead of closing this BZ, I'm reassigning to Kevin for further evaluation, while deferring it to 7.4. (In reply to Ademar Reis from comment #1) > blockdev-add API is still experimental upstream and not supported by > libvirt. But instead of closing this BZ, I'm reassigning to Kevin for > further evaluation, while deferring it to 7.4. Since this bz blocks bz 1232914, whick is ON_QA now; so if this bz deferred to 7.4, shall we reopen bz 1232914 as FAILED QA? (In reply to qianqianzhu from comment #2) > (In reply to Ademar Reis from comment #1) > > blockdev-add API is still experimental upstream and not supported by > > libvirt. But instead of closing this BZ, I'm reassigning to Kevin for > > further evaluation, while deferring it to 7.4. > > Since this bz blocks bz 1232914, whick is ON_QA now; so if this bz deferred > to 7.4, shall we reopen bz 1232914 as FAILED QA? You can use drive_add, instead, to verify that one. (In reply to Fam Zheng from comment #3) > (In reply to qianqianzhu from comment #2) > > (In reply to Ademar Reis from comment #1) > > > blockdev-add API is still experimental upstream and not supported by > > > libvirt. But instead of closing this BZ, I'm reassigning to Kevin for > > > further evaluation, while deferring it to 7.4. > > > > Since this bz blocks bz 1232914, whick is ON_QA now; so if this bz deferred > > to 7.4, shall we reopen bz 1232914 as FAILED QA? > > You can use drive_add, instead, to verify that one. Failed to do blockdev-mirror after drive_add: (qemu) drive_add 0 file=/nfs/mirror.qcow2,format=qcow2,id=drive-virtio-disk1,if=none,detect-zeroes=on OK {"execute":"blockdev-mirror", "arguments": { "device": "drive-virtio-blk0", "target": "drive-virtio-disk1", "sync":"full"}} {"error": {"class": "GenericError", "desc": "Cannot mirror to an attached block device"}} Fam, would you please help check anything wrong here? Thanks. The drive_add command has a special syntax for this use case. It looks like this: (qemu) hmp drive_add -n 0 file.filename=/tmp/test,node-name=d3,detect-zeroes=on Note that the reproducer's '"detect-zeroes": true' is incorrect: "detect-zeroes" is enum BlockdevDetectZeroesOptions, with values off, on, unmap. Simplified reproducer: $ qemu-kvm -nodefaults -S -display none -qmp stdio {"QMP": {"version": {"qemu": {"micro": 0, "minor": 6, "major": 2}, "package": ""}, "capabilities": []}} warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6] { "execute": "qmp_capabilities" } {"return": {}} { "execute": "blockdev-add", "arguments": {"options" : {"driver": "raw", "id":"drive-disk1", "discard":"unmap", "rerror":"stop", "werror":"stop", "file": {"driver": "host_device", "filename": "/dev/sdb"}, "detect-zeroes": true }} } Segmentation fault (core dumped) Upstream v2.7.0 handles this fine: {"error": {"class": "GenericError", "desc": "Invalid parameter type for 'detect-zeroes', expected: string"}} Upstream v2.6.0 crashes exactly like downstream. The crash is in qmp_marshal_blockdev_add()'s cleanup after the error. Might be a dealloc visitor bug, or a visitor core bug. May well affect more than just blockdev-add. Fixed upstream in commit 9b4e38f. *** Bug 1327377 has been marked as a duplicate of this bug. *** *** Bug 1314591 has been marked as a duplicate of this bug. *** Verified with: qemu-kvm-rhev-2.8.0-5.el7.x86_64 kernel-3.10.0-566.el7.x86_64 Steps: 1. Launch guest with cmd[1] 2. create image: # qemu-img create -f qcow2 /nfs/mirror.qcow2 20G 3. Add block dev: { "execute": "blockdev-add", "arguments": {"driver":"qcow2", "node-name": "d3", "file":{"filename":"/nfs/mirror.qcow2","driver":"file"}, "detect-zeroes": "on"}} 4. Block mirror to new added dev: {"execute":"blockdev-mirror", "arguments": { "device": "drive-virtio-disk0", "target": "d3", "sync":"full"}} Result: Both blockdev-add and blockdev-mirror success. {"timestamp": {"seconds": 1488793124, "microseconds": 701751}, "event": "BLOCK_JOB_READY", "data": {"device": "drive-virtio-disk0", "len": 3662413824, "offset": 3662413824, "speed": 0, "type": "mirror"}} cmd[1]: /usr/libexec/qemu-kvm -name linux -cpu SandyBridge -m 2048 -drive file=/nfs/rhel74-64-virtio.qcow2,if=none,cache=writeback,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0 -qmp tcp:0:5555,server,nowait 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://access.redhat.com/errata/RHSA-2017:2392 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://access.redhat.com/errata/RHSA-2017:2392 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://access.redhat.com/errata/RHSA-2017:2392 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://access.redhat.com/errata/RHSA-2017:2392 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://access.redhat.com/errata/RHSA-2017:2392 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://access.redhat.com/errata/RHSA-2017:2392 |