Bug 1171560

Summary: test case 059 of qemu-iotests fail (core dumped) for vmdk with qemu-kvm-1.5.3-83.el7
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: chayang, famz, juzhang, kwolf, michen, pbonzini, qzhang, rbalakri, virt-maint, xfu
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 04:50:38 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:
Bug Depends On: 1002493    
Bug Blocks:    

Description Sibiao Luo 2014-12-08 05:57:40 UTC
Description of problem:
test case 059 of qemu-iotests fail (core dumped) for vmdk with qemu-kvm-1.5.3-83.el7.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.10.0-211.el7.x86_64
qemu-kvm-1.5.3-83.el7.x86_64
qemu-kvm.git branch:
# git branch -v
  all                d3697f2 Update to qemu-kvm-1.5.3-83.el7
* rhel7/master-1.5.3 d3697f2 Update to qemu-kvm-1.5.3-83.el7
  rhev7-master-2.1.2 0f80785 [behind 5] Update to qemu-kvm-rhev-2.1.2-14.el7

How reproducible:
100%

Steps to Reproduce:
1.# git clone git://git.app.eng.bos.redhat.com/virt/rhel7/qemu-kvm.git
2.# cd qemu-kvm
  # git branch -v
    all                d3697f2 Update to qemu-kvm-1.5.3-83.el7
  * rhel7/master-1.5.3 d3697f2 Update to qemu-kvm-1.5.3-83.el7
    rhev7-master-2.1.2 0f80785 [behind 5] Update to qemu-kvm-rhev-2.1.2-14.el7
3.# git pull
4.# ./configure --target-list=x86_64-softmmu; make
5.Go to /home/qemu-kvm/tests/qemu-iotests directory.
  # export QEMU_PROG=/usr/libexec/qemu-kvm
6.# ./check -qcow2|vmdk|vhdx|raw...

Actual results:
After step 6, test case 059 of qemu-iotests fail (core dumped) for vmdk with qemu-kvm-1.5.3-83.el7.
Not run: 006 007 013 014 015 016 022 023 024 025 026 028 029 030 031 035 036 038 039 040 041 042 043 044 045 046 047 048 049 050 051 053 054 060 061 062 064 065 066 067 068 070 075 076
Failures: 059
Failed 1 of 23 tests

Expected results:
It should passed all testing cases successfully.

Additional info:
qemu-iotests]# ./check -vmdk
QEMU          -- /usr/libexec/qemu-kvm
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- vmdk
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 dhcp-11-154 3.10.0-211.el7.x86_64

001 2s ...
...<cutoff here>...
054 1s ... [not run] not suitable for this image format: vmdk
059 6s ... - output mismatch (see 059.out.bad)
--- 059.out	2014-12-02 11:21:57.214900122 +0800
+++ 059.out.bad	2014-12-08 10:18:52.577291722 +0800
@@ -2,19 +2,19 @@
 === Testing invalid granularity ===
 
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-qemu-io: can't open device TEST_DIR/t.vmdk: Invalid granularity, image may be corrupt
-no file open, try 'help open'
+qemu-io: util/error.c:36: error_set: Assertion `*errp == ((void *)0)' failed.
+./059: line 54:  3987 Aborted                 (core dumped) $QEMU_IO -c "read 0 512" "$TEST_IMG"
 === Testing too big L2 table size ===
 
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
 L2 table size too big
-qemu-io: can't open device TEST_DIR/t.vmdk: Could not open 'TEST_DIR/t.vmdk': Wrong medium type
+qemu-io: can't open device TEST_DIR/t.vmdk: invalid VMDK image descriptor
 no file open, try 'help open'
 === Testing too big L1 table size ===
 
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
-qemu-io: can't open device TEST_DIR/t.vmdk: L1 size too big
-no file open, try 'help open'
+qemu-io: util/error.c:36: error_set: Assertion `*errp == ((void *)0)' failed.
+./059: line 67:  4045 Aborted                 (core dumped) $QEMU_IO -c "read 0 512" "$TEST_IMG"
 === Testing monolithicFlat creation and opening ===
 
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=2147483648
060 2s ... [not run] not suitable for this image format: vmdk
...<cutoff here>...

Comment 1 Sibiao Luo 2014-12-08 06:00:06 UTC
# gdb /var/core.3987-0-0-6-1418005127-dhcp-11-154.nay.redhat.com-qemu-io
Core was generated by `/usr/bin/qemu-io -c read 0 512 /home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk'.
Program terminated with signal 6, Aborted.
#0  0x00007fa5fb0375d7 in raise () from /lib64/libc.so.6

(gdb) bt
#0  0x00007fa5fb0375d7 in raise () from /lib64/libc.so.6
#1  0x00007fa5fb038cc8 in abort () from /lib64/libc.so.6
#2  0x00007fa5fb030546 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007fa5fb0305f2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007fa5fe089289 in error_set (errp=errp@entry=0x7fff24ad98b0, err_class=err_class@entry=
    ERROR_CLASS_GENERIC_ERROR, fmt=fmt@entry=0x7fa5fe09a0cd "invalid VMDK image descriptor") at util/error.c:36
#5  0x00007fa5fe0583af in vmdk_open_desc_file (bs=bs@entry=0x7fa5ffb8ca90, desc_offset=desc_offset@entry=0, 
    errp=errp@entry=0x7fff24ad98b0, flags=<optimized out>) at block/vmdk.c:832
#6  0x00007fa5fe05853d in vmdk_open (bs=0x7fa5ffb8ca90, options=<optimized out>, flags=<optimized out>, 
    errp=0x7fff24ad98b0) at block/vmdk.c:862
#7  0x00007fa5fe02b59c in bdrv_open_common (bs=bs@entry=0x7fa5ffb8ca90, file=<optimized out>, 
    options=options@entry=0x7fa5ffb8fcc0, flags=flags@entry=24578, drv=drv@entry=0x7fa5fe2c8980 <bdrv_vmdk>, 
    errp=errp@entry=0x7fff24ad9940) at block.c:838
#8  0x00007fa5fe030461 in bdrv_open (bs=0x7fa5ffb8ca90, 
    filename=filename@entry=0x7fff24adc55a "/home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk", options=0x7fa5ffb8fcc0, 
    options@entry=0x0, flags=24578, flags@entry=16386, drv=<optimized out>, drv@entry=0x0, 
    errp=errp@entry=0x7fff24adb9a0) at block.c:1203
#9  0x00007fa5fe07ecf0 in openfile (name=0x7fff24adc55a "/home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk", flags=16386, 
    growable=growable@entry=0, opts=opts@entry=0x0) at qemu-io.c:1836
#10 0x00007fa5fe0282eb in main (argc=<optimized out>, argv=0x7fff24adbcd8) at qemu-io.c:2108
(gdb)

######################

# gdb /var/core.4045-0-0-6-1418005128-dhcp-11-154.nay.redhat.com-qemu-io
Core was generated by `/usr/bin/qemu-io -c read 0 512 /home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk'.
Program terminated with signal 6, Aborted.
#0  0x00007f6d8b6ba5d7 in raise () from /lib64/libc.so.6

(gdb) bt
#0  0x00007f6d8b6ba5d7 in raise () from /lib64/libc.so.6
#1  0x00007f6d8b6bbcc8 in abort () from /lib64/libc.so.6
#2  0x00007f6d8b6b3546 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f6d8b6b35f2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007f6d8e70c289 in error_set (errp=errp@entry=0x7fff500cedd0, err_class=err_class@entry=
    ERROR_CLASS_GENERIC_ERROR, fmt=fmt@entry=0x7f6d8e71d0cd "invalid VMDK image descriptor") at util/error.c:36
#5  0x00007f6d8e6db3af in vmdk_open_desc_file (bs=bs@entry=0x7f6d901a2a90, desc_offset=desc_offset@entry=0, 
    errp=errp@entry=0x7fff500cedd0, flags=<optimized out>) at block/vmdk.c:832
#6  0x00007f6d8e6db53d in vmdk_open (bs=0x7f6d901a2a90, options=<optimized out>, flags=<optimized out>, 
    errp=0x7fff500cedd0) at block/vmdk.c:862
#7  0x00007f6d8e6ae59c in bdrv_open_common (bs=bs@entry=0x7f6d901a2a90, file=<optimized out>, 
    options=options@entry=0x7f6d901a5cc0, flags=flags@entry=24578, drv=drv@entry=0x7f6d8e94b980 <bdrv_vmdk>, 
    errp=errp@entry=0x7fff500cee60) at block.c:838
#8  0x00007f6d8e6b3461 in bdrv_open (bs=0x7f6d901a2a90, 
    filename=filename@entry=0x7fff500d155a "/home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk", options=0x7f6d901a5cc0, 
    options@entry=0x0, flags=24578, flags@entry=16386, drv=<optimized out>, drv@entry=0x0, 
    errp=errp@entry=0x7fff500d0ec0) at block.c:1203
#9  0x00007f6d8e701cf0 in openfile (name=0x7fff500d155a "/home/qemu-kvm/tests/qemu-iotests/scratch/t.vmdk", flags=16386, 
    growable=growable@entry=0, opts=opts@entry=0x0) at qemu-io.c:1836
#10 0x00007f6d8e6ab2eb in main (argc=<optimized out>, argv=0x7fff500d11f8) at qemu-io.c:2108
(gdb)

Comment 3 Fam Zheng 2014-12-08 07:17:20 UTC
Should be fixed once patches for 1002493 are included in the code base. Marking TestOnly for this reason.

Fam

Comment 4 Ademar Reis 2015-01-20 11:33:03 UTC
Bug 1002493 has been verified, so please check this one as well (it's TestOnly)

Comment 8 errata-xmlrpc 2015-11-19 04:50:38 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/RHBA-2015-2213.html