Red Hat Bugzilla – Bug 1134241
QEMU fails to correctly read/write on VMDK with big flat extent
Last modified: 2015-03-05 03:11:21 EST
The variable used in VMDK driver is "int" type, which will easily overflow if the extent size is large. Quoting the test case from upstream qemu-iotests: echo "=== Testing 4TB monolithicFlat creation and IO ===" IMGOPTS="subformat=monolithicFlat" _make_test_img 4T _img_info $QEMU_IO -c "write -P 0xa 900G 512" "$TEST_IMG" | _filter_qemu_io $QEMU_IO -c "read -v 900G 1024" "$TEST_IMG" | _filter_qemu_io Which creates a 4TB monolithicFlat VMDK, and write at the offset of 900G. The write will hang, fail or at best succeed but pattern 0xa is not written to 900G offset in the image. Expected result: The pattern 0xa is written to correct position in image (900G).
Fix included in qemu-kvm-1.5.3-84.el7
Chart with famz in irc that we can run case 059 in qemu-iotests to verify this issue directly. host info: # uname -r && rpm -q qemu-kvm 3.10.0-219.el7.x86_64 qemu-kvm-1.5.3-84.el7.x86_64 qemu-iotests]# git branch -v * rhel7/master-1.5.3 372a88f Update to qemu-kvm-1.5.3-84.el7 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-10-88 3.10.0-219.el7.x86_64 001 002 003 ... 053 [not run] not suitable for this image format: vmdk 054 [not run] not suitable for this image format: vmdk 059 060 [not run] not suitable for this image format: vmdk ... 092 [not run] not suitable for this image format: vmdk 105 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 077 078 079 080 082 084 086 087 088 092 Passed all 25 tests Base on above, this issue has been fixed correctly, move to VERIFIED status. Please correct me if any mistake, thanks. Best Regards, sluo
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-2015-0349.html