Bug 479315

Summary: img2qcow program crashes...
Product: Red Hat Enterprise Linux 5 Reporter: Gurhan Ozen <gozen>
Component: xenAssignee: Michal Novotny <minovotn>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: areis, berrange, jburke, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-23 08:15:29 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 Gurhan Ozen 2009-01-08 19:50:50 UTC
Description of problem:
 
# img2qcow RH52_x86_64_pv_guest_sp.qcow RH52_x86_64_pv_guest_sp.img
Image size: [10485760]
Created cksum: -626982689
File truncated to length 5370044416
Qcow file created: size 10485760 sectors
Segmentation fault (core dumped)

(gdb) bt
#0  0x0000003147a758bb in free () from /lib64/libc.so.6
#1  0x0000000000403096 in free_aio_state (dd=<value optimized out>) at block-qcow.c:167
#2  0x0000000000405292 in tdqcow_open (dd=0x7fff17474cc0, name=0x18d2a060 "\005", flags=<value optimized out>) at block-qcow.c:1004
#3  0x0000000000406dba in main (argc=<value optimized out>, argv=0x7fff17474e38) at img2qcow.c:204

Version-Release number of selected component (if applicable):
xen-3.0.3-80.el5

How reproducible:
Very

Steps to Reproduce:
1. Try to convert a guest image to qcow image using img2qcow .
2.
3.
  
Actual results:
Crashes...

Expected results:
Shouldn't crash.

Comment 1 Daniel Berrangé 2009-02-20 20:44:42 UTC
Wouldn't be surprised if this is fallout from bug 486353, since this command line tools shares the same IO code as blktap

Comment 2 Michal Novotny 2009-02-23 08:15:29 UTC
Well, I tried it myself after patches for 486353 and 485471 (available on both BZ and they have been also sent to virtualist mailing list) applied and it worked fine for me... Here's my output:

# img2qcow test.qcow test.img
Image size: [1294088]
Created cksum: 114489210
File truncated to length 662743040
Qcow file created: size 1294088 sectors
[=====================]     100%
TRANSFER COMPLETE

Writing cksum: 228597921

So that I think this should be already OK but if any problems found, please report them. I am closing it with duplicate status now...

*** This bug has been marked as a duplicate of bug 486353 ***