Bug 1283116

Summary: [abrt] qemu-img: get_block_status(): qemu-img killed by SIGABRT
Product: Red Hat Enterprise Linux 7 Reporter: Kevin Wolf <kwolf>
Component: qemu-kvmAssignee: Hanna Czenczek <hreitz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: chayang, derez, hreitz, huding, juzhang, knoel, mrezanin, nsoffer, rbalakri, sherold, virt-maint, weliao, xfu, ykaul
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-107.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1229394
: 1290683 1298828 1298886 (view as bug list) Environment:
Last Closed: 2016-11-03 20:07:47 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:
Bug Depends On: 1229394    
Bug Blocks: 1290683, 1298828    

Description Kevin Wolf 2015-11-18 10:01:15 UTC
Cloning for qemu-kvm in RHEL 7.3. The bug is fixed by upstream commit f4a769aba
("raw-posix: Fix .bdrv_co_get_block_status() for unaligned image size").


+++ This bug was initially created as a clone of Bug #1229394 +++

Description of problem:
$ truncate -s 1G test_sparse
$ echo "a" >> test_sparse
$ qemu-img map test_sparse

Version-Release number of selected component:
qemu-img-2.3.0-4.fc22

Additional info:
reporter:       libreport-2.5.1
backtrace_rating: 4
cmdline:        qemu-img map test_sparse
crash_function: get_block_status
executable:     /usr/bin/qemu-img
global_pid:     70309
kernel:         4.0.4-303.fc22.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (2 frames)
 #4 get_block_status at qemu-img.c:2190
 #5 img_map at qemu-img.c:2286

--- Additional comment from Eric Harney on 2015-06-08 17:17:25 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:26 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:27 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:28 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:29 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:30 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:31 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:32 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:33 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:34 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:35 CEST ---



--- Additional comment from Eric Harney on 2015-06-08 17:17:36 CEST ---



--- Additional comment from Cole Robinson on 2015-06-08 22:52:53 CEST ---

Thanks for the simple reproducer! The assertion reproduces for me with qemu-2.1 up to current qemu.git

CCing some block layer folks

--- Additional comment from Kevin Wolf on 2015-06-09 11:26:23 CEST ---

Sent an upstream patch to fix this:
http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg02505.html

--- Additional comment from Cole Robinson on 2015-06-09 16:17:22 CEST ---

Thanks Kevin!

--- Additional comment from Fedora Update System on 2015-08-12 00:10:47 CEST ---

qemu-2.3.0-7.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/qemu-2.3.0-7.fc22

--- Additional comment from Fedora Update System on 2015-08-12 15:36:11 CEST ---

qemu-2.3.1-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/qemu-2.3.1-1.fc22

--- Additional comment from Fedora Update System on 2015-08-13 18:57:16 CEST ---

Package qemu-2.3.1-1.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-2.3.1-1.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13402/qemu-2.3.1-1.fc22
then log in and leave karma (feedback).

--- Additional comment from Fedora Update System on 2015-08-18 07:15:53 CEST ---

qemu-2.3.1-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 weliao 2016-05-24 05:47:01 UTC
Reproduced this bug with qemu-img-1.5.3-105.el7.x86_64 & qemu-kvm-1.5.3-105.el7.x86_64

[root@dhcp-8-118 qemu105]# truncate -s 1G test_sparse
[root@dhcp-8-118 qemu105]# echo "a" >> test_sparse
[root@dhcp-8-118 qemu105]# qemu-img map test_sparse
Offset          Length          Mapped to       File
qemu-img: qemu-img.c:1988: get_block_status: Assertion `nb_sectors' failed.
Aborted (core dumped)
---------------------------------------------------------------------------
verified the bug with qemu-img-1.5.3-109.el7.x86_64 & qemu-kvm-1.5.3-109.el7.x86_64

[root@dhcp-8-118 qemu109]# truncate -s 1G test_sparse
[root@dhcp-8-118 qemu109]# echo "a" >> test_sparse
[root@dhcp-8-118 qemu109]# qemu-img map test_sparse
Offset          Length          Mapped to       File
0x40000000      0x200           0x40000000      test_sparse

according to this result.  The bug is fixed.

Comment 11 errata-xmlrpc 2016-11-03 20:07:47 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, 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://rhn.redhat.com/errata/RHSA-2016-2585.html