RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 856505 - Missing error message in bdrv_commit to read-only backing file
Summary: Missing error message in bdrv_commit to read-only backing file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 856598
TreeView+ depends on / blocked
 
Reported: 2012-09-12 07:46 UTC by Joy Pu
Modified: 2013-11-21 05:52 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.397.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 856598 894250 894251 894253 (view as bug list)
Environment:
Last Closed: 2013-11-21 05:52:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description Joy Pu 2012-09-12 07:46:56 UTC
Description of problem:
Boot up a guest with a image with parameter snapshot=on, readonly=on. Write in the image inside guest, then commit it to the backing files in monitor. The commit will success without any error message. But in fact the backing image is readonly and the commit is not saved in the image files.




Version-Release number of selected component (if applicable):
host kernel:  2.6.32-303.el6.x86_64
# rpm -qa |grep qemu
qemu-kvm-tools-0.12.1.2-2.309.el6.x86_64
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-guest-agent-0.12.1.2-2.309.el6.x86_64
qemu-kvm-0.12.1.2-2.309.el6.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.309.el6.x86_64
qemu-img-0.12.1.2-2.309.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. boot up guest with a data image and set the image parameter like this: ...,readonly=on,snapshot=on

2. dd a file in the guest to the data image set to readonly

3. do commit in monitor

  
Actual results:
commit will not return error message

Expected results:
commit return an error message mentioned that backing image is readonly

Additional info:
1. host cpu
processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 23
model name	: Intel(R) Core(TM)2 Quad CPU    Q9400  @ 2.66GHz
stepping	: 10
cpu MHz		: 1998.000
cache size	: 3072 KB
physical id	: 0
siblings	: 4
core id		: 2
cpu cores	: 4
apicid		: 2
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
bogomips	: 5333.08
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Comment 3 Sibiao Luo 2013-01-11 08:05:03 UTC
I tried the rhel7 aslo hit this issue, clone it to rhel7 for fixing, please correct me if any error.

Comment 4 Jeff Cody 2013-01-15 22:30:54 UTC
In bdrv_commit(), we are (appropriately) refusing to write to the backing file (in this case, the top-level snapshot, as the active layer is a temp image).  The function bdrv_reopen() returns an error, and bdrv_commit() returns -EACCES.

However, do_commit(), which is the message handler that calls bdrv_commit(), only checks for -EBUSY when it comes to returning an error message.

Comment 5 Jeff Cody 2013-01-18 19:39:26 UTC
Patch submitted upstream:
https://lists.gnu.org/archive/html/qemu-devel/2013-01/msg03456.html

Comment 16 zhonglinzhang 2013-09-09 08:54:29 UTC
Reproduce with qemu-kvm-0.12.1.2-2.394.el6.x86_64

Steps to Reproduce:
1. Boot a guest:
.... -drive file=/home/RHEL6.5-64-0905.qcow2,if=none,id=drive-system-disk,media=disk,format=qcow2,aio=native,werror=stop,rerror=stop,snapshot=on,readonly=on -device virtio-blk-pci,scsi=on,bus=pci.0,drive=drive-system-disk,id=system-disk,bootindex=1,addr=0x5 ...................

2. Create big file in guest:
dd if=/dev/zero of=dd_1G bs=1M count=1024

3. Commit in qemu monitor
(qemu) commit drive-system-disk

Actual Results:
commit will not return error message




Verify with qemu-kvm-0.12.1.2-2.400.el6.x86_64
steps as above

Actual Results:
(qemu) commit drive-system-disk 
'commit' error for 'drive-system-disk': Permission denied



Based on above information, this issue has been fixed.

Comment 19 errata-xmlrpc 2013-11-21 05:52:20 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-1553.html


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