Bug 1224675
| Summary: | ppc64le: virt-sparsify fails to make a disk image sparse, the output log indicates it gets the wrong parameter in the disk create step | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Hu Zhang <huzhan> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | high | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | CC: | leiwang, linl, ptoscano, wshi |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | ppc64le | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libguestfs-1.28.1-1.37.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 07:01:17 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: | 1225995 | ||
| Bug Blocks: | |||
|
Description
Hu Zhang
2015-05-25 10:05:37 UTC
Yes, I can reproduce this. The trace shows: libguestfs: trace: disk_create "/tmp/sparsify437efa.qcow2" "qcow2" 282574488338432 "backingfile:/mnt/scratch/rhel-7.1-ppc64le.img" "compat:1.1" libguestfs: trace: disk_create = -1 (error) virt-sparsify: error: libguestfs error: if using a backing file, size must be passed as -1 As you can see, 282574488338432 is being passed instead of -1. 282574488338432 == 0x1_0100_0000_0000 which is a rather strange number. Stack trace:
#0 0x00000000100ab8d8 in ocaml_guestfs_disk_create (gv=70367494005936,
backingfilev=70367495353480, backingformatv=1, preallocationv=1,
compatv=270154852, clustersizev=1, filenamev=70367495353624,
formatv=270154884, sizev=270772368) at guestfs-c-actions.c:4138
#1 0x0000000010105e88 in caml_c_call ()
#2 0x0000000010039974 in camlGuestfs__fun_25930 ()
#3 0x000000001001d490 in caml_curry8_7 ()
#4 0x000000001001ea80 in caml_send8 ()
#5 0x0000000010020a7c in camlCopying__create_1083 ()
#6 0x00000000100221f4 in camlCopying__run_1047 ()
#7 0x000000001001f43c in camlSparsify__main_1042 ()
#8 0x0000000010028b4c in camlCommon_utils__run_main_and_handle_errors_1227 ()
#9 0x000000001001f528 in camlSparsify__entry ()
#10 0x0000000010011900 in caml_program ()
#11 0x000000001010600c in caml_start_program ()
#12 0x00000000100e82d8 in caml_main ()
#13 0x0000000010010f2c in main ()
The sizev value (an Int64.t) evaluates to
(gdb) print/x size
$3 = 0x1010000000000
The sizev value contains:
(gdb) x/4g (270772368-8)
0x1023a888: 0x00000000000001c1 0x000000001023a0c0
0x1023a898: 0x0001010000000000 0x0000000100000001
The header looks quite bogus.
My suspicion falls on the assembler harness used to jump from
OCaml into C (caml_curry8 etc).
This is an OCaml compiler bug on ppc64le. See bug 1225995. Verified with the packages: libguestfs-1.28.1-1.54.el7.ppc64le libguestfs-tools-c-1.28.1-1.54.el7.ppc64le Verify step: 1. On a ppc64le machine. # virt-sparsify RHEL-Server-6.7-64-hvm.raw test.img -v -x ... Sparsify operation completed with no errors. Before deleting the old disk, carefully check that the target disk boots and works correctly. libguestfs: trace: close libguestfs: closing guestfs handle 0x1001872a7e0 (state 0) virt-sparsify works as expected. So verified. 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-2183.html |