Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1492178 - Non-top-level change-backing-file causes assertion failure
Non-top-level change-backing-file causes assertion failure
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.5
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Kevin Wolf
Qianqian Zhu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-15 12:20 EDT by Kevin Wolf
Modified: 2018-06-15 12:37 EDT (History)
11 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.10.0-11.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 20:36:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 None None None 2018-04-10 20:37 EDT

  None (edit)
Description Kevin Wolf 2017-09-15 12:20:31 EDT
The following was tested on upstream qemu.git master. 2.10 is affected.

Steps to reproduce the assertion failure:

1. Create a backing file chain with at least three images:

$ qemu-img create -f qcow2 /tmp/base.qcow2 64M
$ qemu-img create -f qcow2 -b /tmp/base.qcow2 /tmp/mid.qcow2
$ qemu-img create -f qcow2 -b /tmp/mid.qcow2 /tmp/top.qcow2

2. Try to use the "change-backing-file" QMP command to change the backing file of mid.qcow2:

$ LANG=C x86_64-softmmu/qemu-system-x86_64 -drive file=/tmp/top.qcow2,backing.node-name=mid -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 50, "minor": 10, "major": 2}, "package": " (v2.10.0-485-g6beb456cac)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"change-backing-file", "arguments":{"device":"ide0-hd0","image-node-name":"mid","backing-file":"/dev/null"}}
qemu-system-x86_64: block/io.c:1359: bdrv_aligned_pwritev: Assertion `child->perm & BLK_PERM_WRITE' failed.

This will be fixed upstream with the following series:

    [PATCH 0/6] block: Fix permissions after ro/rw reopen
    https://lists.gnu.org/archive/html/qemu-block/2017-09/msg00449.html
Comment 3 Miroslav Rezanina 2017-12-05 07:58:37 EST
Fix included in qemu-kvm-rhev-2.10.0-11.el7
Comment 5 Qianqian Zhu 2017-12-06 03:15:40 EST
Reproduced on qemu-kvm-rhev-10:2.10.0-9.el7:

Steps:
[root@dhcp-8-119 pkgs]# qemu-img create -f qcow2 /tmp/base.qcow2 64M
[root@dhcp-8-119 pkgs]#  qemu-img create -f qcow2 -b /tmp/base.qcow2 /tmp/mid.qcow2
[root@dhcp-8-119 pkgs]# qemu-img create -f qcow2 -b /tmp/mid.qcow2 /tmp/top.qcow2

[root@dhcp-8-119 pkgs]# /usr/libexec/qemu-kvm -drive file=/tmp/top.qcow2,backing.node-name=mid -qmp stdio
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 10, "major": 2}, "package": "(qemu-kvm-rhev-2.10.0-9.el7)"}, "capabilities": []}}
VNC server running on ::1:5900
{"execute":"qmp_capabilities"}
{"return": {}}
{"execute":"change-backing-file", "arguments":{"device":"ide0-hd0","image-node-name":"mid","backing-file":"/dev/null"}}

Result:
qemu-kvm: block/io.c:1359: bdrv_aligned_pwritev: Assertion `child->perm & BLK_PERM_WRITE' failed.
Aborted (core dumped)

Verified on qemu-kvm-rhev-10:2.10.0-11.el7:
Steps:
Same as above.

Result:
Change backing file success.
{"execute":"query-block"}
 "backing-filename": "/dev/null"

Moving to VERIFIED based on above result.
Comment 7 errata-xmlrpc 2018-04-10 20:36:03 EDT
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-2018:1104

Note You need to log in before you can comment on or make changes to this bug.