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 1023874 - [Regression] Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is not the same as expected
Summary: [Regression] Prompt error of trigger blkdebug: BLKDBG_CLUSTER_FREE event is n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Hanna Czenczek
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1056252
TreeView+ depends on / blocked
 
Reported: 2013-10-28 07:55 UTC by Qunfang Zhang
Modified: 2014-10-14 06:53 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.425.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 06:53:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description Qunfang Zhang 2013-10-28 07:55:52 UTC
Description of problem:
During re-verification for bug 796011, I found it's reproduced again in qemu-kvm-415.  As this bug is verified pass on qemu-kvm-375, so I downgrade my qemu-kvm version and found the regression was introduced on qemu-kvm-391 which fixed the bug 848070 ([RHEL 6.5] Add glusterfs support to qemu)

qemu-kvm-390: pass
qemu-kvm-391: fail
qemu-kvm-415: fail


Version-Release number of selected component (if applicable):
kernel-2.6.32-425.el6.x86_64
qemu-kvm-0.12.1.2-2.415.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Configure blkdebug file and store it on the specific location.
# cat /home/blkdebug.cfg
[inject-error]
event = "cluster_free"
#errno = "5"
errno = "28"
immediately = "off"

2.Create qcow2 image with small cluster size

#qemu-img create -f qcow2 -o cluster_size=512 disk.qcow2 10G

3. Create internal snapshot. 
# qemu-img snapshot -c disk_snap disk.qcow2

4. List the internal snapshot:

# qemu-img snapshot -l disk.qcow2 
Snapshot list:
ID        TAG                 VM SIZE                DATE       VM CLOCK
1         disk_snap                 0 2013-10-28 15:47:26   00:00:00.000

5. trigger blkdebug: BLKDBG_CLUSTER_FREE event and prompt error.

# qemu-img snapshot -d disk_snap blkdebug:blkdebug.cfg:disk.qcow2 


Actual results:
After step 5:
# qemu-img snapshot -d disk_snap blkdebug:blkdebug.cfg:disk.qcow2 
Could not delete snapshot 'disk_snap': -95 (Operation not supported)


Expected results:
# qemu-img snapshot -d disk_snap blkdebug:blkdebug.cfg:disk.qcow2 
qcow2_free_clusters failed: No space left on device
Could not delete snapshot 'disk_snap': -28 (No space left on device)


Additional info:

Comment 1 Kevin Wolf 2013-10-28 14:32:35 UTC
I bisected this to downstream commit f0d6b82f ('block: Produce zeros when
protocols reading beyond end of file'). As it's not completely obvious,
understanding how this change broke the error message would require some more
investigation.

In any case, this is about internal snapshots, which we consider unsupported,
and a rather minor impact (reporting "Operation not supported" instead of the real
error). While this is a regression technically, I don't think there's a reason
to treat this as a blocker as long as no customer complains.

I recommend moving this bug to 6.6.

(Also CCing Max who did some upstream fixes related to the patch in question)

Comment 7 Hanna Czenczek 2014-03-21 03:27:30 UTC
I personally find it much more interesting that I'm not able to use blkdebug on top of qcow2 at all – qemu-io always returns EIO for me and the BDS chain does not seem to involve qcow2 at all (which explains the ENOTSUP for deleting the snapshot).
I tracked the problem to bdrv_check_byte_request() which checks the request against the length of the block device. bdrv_getlength() always returns 0 for the blkdebug, which is not suprising considering blkdebug does not implement that function downstream. Backporting e1302255 fixes this and therefore qemu-io can finally successfully read from a qcow2 image with blkdebug.
This fixes the problem described in this bugzilla as well – I guess format detection simply did not work with blkdebug always reporting an empty image file and subsequently snapshot operations could not be executed.

Comment 8 Miroslav Rezanina 2014-04-29 06:01:27 UTC
Fix included in qemu-kvm-0.12.1.2-2.425.el6

Comment 10 Qunfang Zhang 2014-06-25 11:18:29 UTC
Verified pass on qemu-kvm-0.12.1.2-2.428.el6.x86_64 with the same steps in comment 0. 

Result:

After step 5:

[root@localhost qzhang]# qemu-img snapshot -d disk_snap blkdebug:blkdebug.cfg:disk.qcow2 
qcow2_free_clusters failed: No space left on device
Could not delete snapshot 'disk_snap': -28 (No space left on device)

So, this bug is fixed.

Comment 11 errata-xmlrpc 2014-10-14 06:53:50 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/RHBA-2014-1490.html


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