Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
While we have fixed similar problems in the past (BZ 1551486, BZ 1603104), we have not addressed the root problem yet, which is that qemu should generally ignore file locking errors when loosening restrictions, because they are not fatal. Certainly that should not lead to crashes.
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-32.el7
How reproducible:
Always
Steps to Reproduce:
1. qemu-img create -f qcow2 foo.qcow2 64M
Formatting 'foo.qcow2', fmt=qcow2 size=67108864 cluster_size=65536 lazy_refcounts=off refcount_bits=16
2. qemu-system-x86_64 -hda foo.qcow2 &
[1] 11659
3. rm foo.qcow2
4. kill %1
qemu-system-x86_64: terminating on signal 15 from pid 4518 (zsh)
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:903:
qemu-system-x86_64: Could not reopen file: No such file or directory
5. [1] + 11659 abort (core dumped) qemu-system-x86_64 -hda foo.qcow2
Actual results:
qemu aborts, as shown above.
Expected results:
qemu should not abort.
Additional info:
If “qemu crashes when it should exit” does not sound bad, the above experiment works just as well with eject:
$ qemu-img create -f qcow2 foo.qcow2 1440K
Formatting 'foo.qcow2', fmt=qcow2 size=1474560 cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ (sleep 2; echo 'eject floppy0') | \
qemu-system-x86_64 -fda foo.qcow2 -monitor stdio &; \
sleep 1; rm foo.qcow2; wait %1
[1] 15970 15971
QEMU 2.12.0 monitor - type 'help' for more information
(qemu) eject floppy0
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:903:
Could not reopen file: No such file or directory
[1] + 15970 done ( sleep 2; echo 'eject floppy0'; ) |
15971 abort (core dumped) qemu-system-x86_64 -fda foo.qcow2 -monitor stdio
Or with USB devices:
$ qemu-img create -f qcow2 foo.qcow2 64M
Formatting 'foo.qcow2', fmt=qcow2 size=67108864 cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ (sleep 2; echo 'device_del usb0') | \
qemu-system-x86_64 -drive if=none,id=drv0,file=foo.qcow2 \
-device qemu-xhci \
-device usb-storage,id=usb0,drive=drv0 \
-monitor stdio &; \
sleep 1; rm foo.qcow2; wait %1
[1] 16672 16673
QEMU 2.12.0 monitor - type 'help' for more information
(qemu) device_del usb0
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:903:
Could not reopen file: No such file or directory
[1] + 16672 done ( sleep 2; echo 'device_del usb0'; ) |
16673 abort (core dumped) qemu-system-x86_64 -drive if=none,id=drv0,file=foo.qcow2
The RHEL 8 BZs are BZ 1709791 and BZ 1703793.
Reproduce this issue as below:
1. Create test image file
# qemu-img create -f qcow2 foo.qcow2 64M
Formatting 'foo.qcow2', fmt=qcow2 size=67108864 cluster_size=65536 lazy_refcounts=off refcount_bits=16
2. Boot guest from it
# /usr/libexec/qemu-kvm -hda foo.qcow2
VNC server running on ::1:5900
3. Remove the image
# rm foo.qcow2 -f
4. Quit the guest via Ctrl+c
# /usr/libexec/qemu-kvm -hda foo.qcow2
VNC server running on ::1:5900
^Cqemu-kvm: terminating on signal 2
Unexpected error in raw_reconfigure_getfd() at block/file-posix.c:903:
qemu-kvm: Could not reopen file: No such file or directory
Aborted (core dumped)
Additional info:
# qemu-img --version
qemu-img version 2.12.0 (qemu-kvm-rhev-2.12.0-32.el7)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
# uname -r
3.10.0-1052.el7.x86_64