Bug 1883608
| Summary: | 'qemu-nbd -B bitmap ...' without -r corrupts the bitmap | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Eric Blake <eblake> |
| Component: | qemu-kvm | Assignee: | Eric Blake <eblake> |
| qemu-kvm sub component: | qcow2 | QA Contact: | zixchen |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | medium | CC: | aliang, coli, eblake, jinzhao, juzhang, mrezanin, ngu, virt-maint, xuwei |
| Version: | 8.3 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | 8.3 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-25 06:43:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Eric Blake
2020-09-29 17:07:10 UTC
It turns out the problem was a lack of a SIGINT handler. While I was trying to debug this, I discovered that an unrelated patch pending upstream review happens to fix it: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg10419.html Another upstream patch proposal with fewer dependencies: https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg10928.html Eric - Assigning to you for now whether Stefan's or your fix are accepted upstream. Fix is now upstream:
commit 029a88c9a7e3210ba565c081471bd44ba8d5e397
Author: Eric Blake <eblake>
Date: Wed Sep 30 07:11:01 2020 -0500
qemu-nbd: Honor SIGINT and SIGHUP
Honoring just SIGTERM on Linux is too weak; we also want to handle
other common signals, and do so even on BSD. Why? Because at least
'qemu-nbd -B bitmap' needs a chance to clean up the in-use bit on
bitmaps when the server is shut down via a signal.
See also: http://bugzilla.redhat.com/1883608
Signed-off-by: Eric Blake <eblake>
Message-Id: <20200930121105.667049-2-eblake>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov>
[eblake: apply comment tweak suggested by Vladimir; fix ifdef around
termsig_handler]
Signed-off-by: Eric Blake <eblake>
Moving to 8.4.0 and placing in POST since RHV doesn't require this for 8.3.1 and the code will be in qemu-5.2. Set the ITM to 11 just as a best guess for when rebase is complete and testing can be done from the rebase. Test with qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64, not found this issue, change status to tested. Version: qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64 kernel-4.18.0-259.el8.dt4.x86_64 Steps to Reproduce: 1. qemu-img create -f qcow2 image 1M 2. qemu-img bitmap --add image b0 3. qemu-nbd -f qcow2 -B b0 image # followed by ^C 4. qemu-nbd -f qcow2 -B b0 image Actual result: After step 4, it can export image, checked image info successfully with command qemu-img info nbd:loclahost:10809 Expoected result: Same as above. As qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a.x86_64 already be tested with no issue found, change status to verified. 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 (virt:av 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/RHBA-2021:2098 |