Bug 736942
Summary: | qcow2:Segment fault when rebase snapshot on iscsi disk but do no create the qcow2 file on it | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Qunfang Zhang <qzhang> |
Component: | qemu-kvm | Assignee: | Kevin Wolf <kwolf> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 6.2 | CC: | acathrow, areis, juzhang, michen, minovotn, mkenneth, shu, sluo, tburke, virt-maint |
Target Milestone: | rc | Keywords: | Rebase |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-0.12.1.2-2.222.el6 | Doc Type: | Rebase: Bug Fixes and Enhancements |
Doc Text: |
Cause:
The cleanup code of qemu-img rebase lacks NULL pointer checks for the old and the new backing file.
Consequence:
After printing an error message, qemu-img rebase runs into a segmentation fault when it is used in safe mode with an image whose (old or new) backing file cannot be opened.
Fix:
The cleanup code of qemu-img gets additional NULL pointer checks.
Result:
qemu-img fails gracefully if either the new or the old backing file cannot be opened.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 11:34:11 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Qunfang Zhang
2011-09-09 06:47:27 UTC
I have reproduced this issue on qemu-kvm-0.12.1.2-2.221.el6.x86_64 and verified this issue on qemu-kvm-0.12.1.2-2.227.el6.x86_64 with the same steps as # Description. The result of reproduce is that the qemu-img got segmentation fault (core dumped), and the details as following: # qemu-img rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 qemu-img: Could not open old backing file '' Segmentation fault (core dumped) (gdb) r rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 Starting program: /usr/bin/qemu-img rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 [Thread debugging using libthread_db enabled] qemu-img: Could not open old backing file '' Program received signal SIGSEGV, Segmentation fault. bdrv_delete (bs=0x0) at block.c:689 689 assert(!bs->dev); Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.5.x86_64 libaio-0.3.107-10.el6.x86_64 zlib-1.2.3-27.el6.x86_64 (gdb) bt #0 bdrv_delete (bs=0x0) at block.c:689 #1 0x00007ffff7fbde34 in img_rebase (argc=<value optimized out>, argv=<value optimized out>) at qemu-img.c:1501 #2 0x00007ffff71d6cdd in __libc_start_main () from /lib64/libc.so.6 #3 0x00007ffff7fbce99 in _start () (gdb) q The result of verify is that qemu-img didn't get segmentation fault, and gave a error prompt, this was just the expected results. And the details as following: # qemu-img rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 qemu-img: Could not open old backing file '' (gdb) r rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 Starting program: /usr/bin/qemu-img rebase -p -b /dev/sluo/lvtest /dev/sluo/lvtest-sn2 [Thread debugging using libthread_db enabled] qemu-img: Could not open old backing file '' Program exited with code 01. Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.47.el6_2.5.x86_64 libaio-0.3.107-10.el6.x86_64 zlib-1.2.3-27.el6.x86_64 (gdb) bt No stack. Above all, the this issue has been fixed. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Install a guest on iSCSI disk but do not create a qcow2 file on it. Consequence: Qemu-kvm fails with segmentation fault. Fix: [NEEDINFO: Kevin, could you please add information? Thanks] Result: Qemu-kvm keeps running. Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,11 +1,11 @@ Cause: -Install a guest on iSCSI disk but do not create a qcow2 file on it. +The cleanup code of qemu-img rebase lacks NULL pointer checks for the old and the new backing file. Consequence: -Qemu-kvm fails with segmentation fault. +After printing an error message, qemu-img rebase runs into a segmentation fault when it is used in safe mode with an image whose (old or new) backing file cannot be opened. Fix: -[NEEDINFO: Kevin, could you please add information? Thanks] +The cleanup code of qemu-img gets additional NULL pointer checks. Result: -Qemu-kvm keeps running.+qemu-img fails gracefully if either the new or the old backing file cannot be opened. 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-2012-0746.html |