Bug 1477758 - supermin: exception: End_of_file
supermin: exception: End_of_file
Status: VERIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: supermin (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
:
Depends On: 1484890
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-02 16:43 EDT by Richard W.M. Jones
Modified: 2018-02-22 04:47 EST (History)
5 users (show)

See Also:
Fixed In Version: supermin-5.1.19-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
supermin5 -v -v -v output (1.81 MB, text/plain)
2017-08-02 17:16 EDT, Richard W.M. Jones
no flags Details

  None (edit)
Description Richard W.M. Jones 2017-08-02 16:43:51 EDT
Description of problem:

supermin throws this exception:

supermin: exception: End_of_file

Version-Release number of selected component (if applicable):

supermin 5.1.16 probably from RHEL 7.3
libguestfs 1.32.7-3.el7_3.2

How reproducible:

Happened once.

Steps to Reproduce:
1. Starting libguestfs, so probably 'libguestfs-test-tool'
Comment 2 Richard W.M. Jones 2017-08-02 16:49:23 EDT
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-36/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-36/appliance.d
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-36/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-winsupport.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 204 packages, including dependencies
supermin: build: 31894 files
supermin: build: 8371 files, after matching excludefiles
supermin: build: 8378 files, after adding hostfiles
supermin: build: 8372 files, after removing unreadable files
supermin: build: 8415 files, after munging
supermin: exception: End_of_file
libguestfs: trace: v2v: launch = -1 (error)
virt-v2v: error: libguestfs error: /usr/bin/supermin5 exited with error 
status 1, see debug messages above
Comment 3 Richard W.M. Jones 2017-08-02 17:16 EDT
Created attachment 1308511 [details]
supermin5 -v -v -v output
Comment 4 Richard W.M. Jones 2017-08-02 17:27:44 EDT
One place which would be consistent with this error is if
src/format_ext2_kernel.ml:read_string:really_input throws
this exception because we encounter a zero-length (or very
short) truncate vmlinuz file.
Comment 7 Xianghua Chen 2017-08-03 02:33:22 EDT
I can't reproduce this bug with libguestfs1.36.3 or libguestfs1.32.7 & supermin5.1.16 by the following steps:
# touch /boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
# du -sh /boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
0	/boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
# libguestfs-test-tool

So, is this bug related to v2v ? If yes, I'll add v2v to whiteboard , if not, could you please tell me how to reproduce this bug? Thanks!
Comment 8 Richard W.M. Jones 2017-08-03 03:38:53 EDT
Yes it could affect virt-v2v.

(In reply to Xianghua Chen from comment #7)
> I can't reproduce this bug with libguestfs1.36.3 or libguestfs1.32.7 &
> supermin5.1.16 by the following steps:
> # touch /boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
> # du -sh /boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
> 0	/boot/vmlinuz-3.10.0-514.26.1.el7.x86_64
> # libguestfs-test-tool

A reproducer is:

# touch /boot/vmlinuz-999.x86_64
# rm -rf /var/tmp/.guestfs-*
# libguestfs-test-tool
# rm /boot/vmlinuz-999.x86_64
Comment 9 Richard W.M. Jones 2017-08-03 08:59:57 EDT
Patches posted:
https://www.redhat.com/archives/libguestfs/2017-August/msg00025.html
Comment 12 Xianghua Chen 2018-02-22 04:13:40 EST
Verified with packages:
supermin-5.1.19-1.el7

Steps:
1. 
# touch /boot/vmlinuz-999.x86_64
# rm -rf /var/tmp/.guestfs-*
# libguestfs-test-tool

2.
# rm /boot/vmlinuz-999.x86_64

The libguestfs-test-tool in step 1 passed , no error errored like "supermin: exception: End_of_file“, so verified.
Comment 13 mxie@redhat.com 2018-02-22 04:47:12 EST
I can reproduce this bug with supermin5-5.1.16-4.el7.x86_64

Related packages:
virt-v2v-1.36.10-6.el7.x86_64
libguestfs-1.36.10-6.el7.x86_64
libvirt-3.9.0-13.el7.x86_64
qemu-kvm-rhev-2.10.0-21.el7.x86_64
supermin5-5.1.16-4.el7.x86_64


Reproduce steps:
1.Execute below commands on v2v conversion server
# touch /boot/vmlinuz-999.x86_64
# rm -rf /var/tmp/.guestfs-*

2.Use v2v to convert a guest with -v -x but the conversion will be failed with same error of bug
# virt-v2v -ic vpx://root@10.73.75.182/data/10.73.72.61/?no_verify=1 esx6.0-win10-x86_64 -o rhv -os 10.73.131.93:/home/nfs_export --password-file /tmp/passwd -v -x
....
supermin: version: 5.1.16
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-winsupport.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 190 packages, including dependencies
supermin: build: 31598 files
supermin: build: 7573 files, after matching excludefiles
supermin: build: 7582 files, after adding hostfiles
supermin: build: 7576 files, after removing unreadable files
supermin: build: 7600 files, after munging
supermin: exception: End_of_file
libguestfs: trace: v2v: launch = -1 (error)
virt-v2v: error: libguestfs error: /usr/bin/supermin5 exited with error 
status 1, see debug messages above
umount '/tmp/v2v.NAn7Nc'
rm -rf '/var/tmp/null.laaZe8'
libguestfs: trace: v2v: close
libguestfs: closing guestfs handle 0x26724a0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsnQ0dIh
libguestfs: trace: close
libguestfs: closing guestfs handle 0x25b49e0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x2670fb0 (state 0)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x2590910 (state 0)



Update supermin5 to 5.1.19-1.el7.x86_64 and use v2v to convert guest again, then v2v conversion could be finished without error

# virt-v2v -ic vpx://root@10.73.75.182/data/10.73.72.61/?no_verify=1 esx6.0-win10-x86_64 -o rhv -os 10.73.131.93:/home/nfs_export --password-file /tmp/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root@10.73.75.182/data/10.73.72.61/?no_verify=1 esx6.0-win10-x86_64
[   1.5] Creating an overlay to protect the source from being modified
[   2.1] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[   2.2] Opening the overlay
[  10.6] Inspecting the overlay
[  87.3] Checking for sufficient free disk space in the guest
[  87.3] Estimating space required on target for each disk
[  87.3] Converting Windows 10 Enterprise to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  99.1] Mapping filesystem data to avoid copying unused and blank areas
[  99.7] Closing the overlay
[  99.9] Checking if the guest needs BIOS or UEFI to boot
[  99.9] Assigning disks to buses
[  99.9] Copying disk 1/1 to /tmp/v2v.5tA9ey/a2f71361-0af3-41db-bfa2-6438e1558cbd/images/fb98b969-c991-45e8-89b5-952eb7024cbb/95a065a6-b68c-417d-b185-e431689928a6 (raw)
    (100.00/100%)
[ 915.1] Creating output metadata
[ 915.1] Finishing off

Note You need to log in before you can comment on or make changes to this bug.