Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: If I try open an QEMU VM immediately after guestunmount a QEMU VM image, the following error occurs, qemu-img: Could not open 'Fedora-Cloud-Base-35-1.2.x86_64.qcow2': Failed to get shared "write" lock Version-Release number of selected component (if applicable): libguestfs-1:1.48.1-1.fc37 How reproducible: always Steps to Reproduce: 1. dnf install libguestfs -y 2. mount a QEMU VM image LIBGUESTFS_BACKEND=direct guestmount -a Fedora-Cloud-Base-35-1.2.x86_64.qcow2 -i t 3. run "qemu-img info" immediately after unmounting the image LIBGUESTFS_BACKEND=direct guestunmount && qemu-img info Fedora-Cloud-Base-35-1.2.x86_64.qcow2 Actual results: qemu-img complains "qemu-img: Could not open 'Fedora-Cloud-Base-35-1.2.x86_64.qcow2': Failed to get shared "write" lock". I need to wait for 1 second or more time before being able to run qemu-im info successfully. Expected results: qemu-img should return the image info normally. Additional info: This bug can be reproduced on f35 with libguestfs-1.48.0-1.fc35 as well.
You might try asking qemu-img to ignore locks (-U option). However the more general problem is that qemu (attached to the disk image) takes a little bit of time to exit and release the lock, and it seems as if fusermount (guestmount is just a wrapper around this) exits before this has happened. You could try running guestmount with a lot more debugging enabled (-v -x) to see if you can identify exactly where the race happens.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle. Changing version to 37.
This message is a reminder that Fedora Linux 37 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 37 on 2023-12-05. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '37'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 37 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 37 entered end-of-life (EOL) status on None. Fedora Linux 37 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.