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 1857779 - QEMU command 'transaction': Bitmap already exists: libvirt-tmp-activewrite
Summary: QEMU command 'transaction': Bitmap already exists: libvirt-tmp-activewrite
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Peter Krempa
QA Contact: yisun
URL:
Whiteboard:
Depends On: 1857735 1861681
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-16 14:45 UTC by Jaroslav Suchanek
Modified: 2020-11-04 02:55 UTC (History)
9 users (show)

Fixed In Version: libvirt-6.0.0-26.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1857735
Environment:
Last Closed: 2020-11-04 02:54:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4676 0 None None None 2020-11-04 02:54:46 UTC

Description Jaroslav Suchanek 2020-07-16 14:45:48 UTC
+++ This bug was initially created as a clone of Bug #1857735 +++

Description of problem:
When using rhv 4.4 to create live snapshot of vm, it succeeds twice but fails during vm snapshot removal on the third time.

VDSM does not handle the exception thrown by libvirt.  This issue of handling exceptions for vdsm is addressed in: https://bugzilla.redhat.com/show_bug.cgi?id=1857347  

This bug a placeholder for the issue described in:
 https://bugzilla.redhat.com/show_bug.cgi?id=1857347#c8



Version-Release number of selected component (if applicable):
libvirt 6.0.0-25
rhv-release-4.4.1-10-001.noarch
vdsm-4.40.22-1.el8ev.x86_64
4.18.0-193.14.1.el8_2.x86_64 rhel 8.2

How reproducible:
100% 

Steps to Reproduce:
1. Live VM Snapshot
2. Removal of VM snapshot
3. Repeat twice
On the third time exception occurs.

see attached logs

Actual results:
exceptions are in logs

Expected results:
Exceptions to be handled.


Additional info:

--- Additional comment from Peter Krempa on 2020-07-16 15:09:22 CEST ---

Libvirt accidentally doesn't remove the temporary bitmap after it's no longer needed when bitmaps are not present in the source image. This makes it impossible to complete any active layer block commits into the broken bitmap until the VM is restarted.


--- Additional comment from Peter Krempa on 2020-07-16 16:38:59 CEST ---

Patches proposed upstream: https://www.redhat.com/archives/libvir-list/2020-July/msg01221.html

Comment 6 yisun 2020-07-28 04:23:38 UTC
Test with:
libvirt-6.0.0-26.module+el8.3.0+7455+623d0f4c.x86_64

Result: PASS

Test steps:
1. create external snapshot
2. do blockcommit with --pivot --active
3. delete snapshot metadata
4. delete snapshot image file
5. repeat 1~4, but in step 2, do blockcommit --acitve, then do a blockjob --pivot
6. repeat 1~5 for 5 times

Shell script as follow:
[root@libvirt-rhel-8 ~]# cat test.sh 
vm=$1
for i in {1..5}  
do
      snap_name=snap_$i	
      virsh snapshot-create-as $vm $snap_name --disk-only
      sleep 2
      virsh blockcommit $vm vda --active --pivot
      sleep 2
      virsh snapshot-delete $vm $snap_name --metadata
      rm -f /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.snap_*
      virsh snapshot-create-as $vm $snap_name --disk-only
      virsh blockcommit $vm vda --active
      sleep 2
      virsh blockjob $vm vda --pivot 
      virsh snapshot-delete $vm $snap_name --metadata
      rm -f /var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.snap_*
done


Test output as follow:
[root@libvirt-rhel-8 ~]# sh test.sh avocado-vt-vm1
Domain snapshot snap_1 created

Successfully pivoted
Domain snapshot snap_1 deleted

Domain snapshot snap_1 created
Active Block Commit started

Domain snapshot snap_1 deleted

Domain snapshot snap_2 created

Successfully pivoted
Domain snapshot snap_2 deleted

Domain snapshot snap_2 created
Active Block Commit started

Domain snapshot snap_2 deleted

Domain snapshot snap_3 created

Successfully pivoted
Domain snapshot snap_3 deleted

Domain snapshot snap_3 created
Active Block Commit started

Domain snapshot snap_3 deleted

Domain snapshot snap_4 created

Successfully pivoted
Domain snapshot snap_4 deleted

Domain snapshot snap_4 created
Active Block Commit started

Domain snapshot snap_4 deleted

Domain snapshot snap_5 created

Successfully pivoted
Domain snapshot snap_5 deleted

Domain snapshot snap_5 created
Active Block Commit started

Domain snapshot snap_5 deleted

Comment 9 errata-xmlrpc 2020-11-04 02:54:04 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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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-2020:4676


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