Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#837681: diffoscope: 'ERROR guestfs can't be launched' when trying to compare to qubes ISOs

114 views
Skip to first unread message

Holger Levsen

unread,
Sep 13, 2016, 9:40:04 AM9/13/16
to
Package: diffoscope
Version: 60
Severity: normal

Hi,

so I build an Qubes ISO, twice and ran diffoscope against it:

holger@profitbricks-build3-amd64:~$ sudo schroot --directory /tmp -c source:jenkins-reproducible-unstable-diffoscope diffoscope -- --html /tmp/q.html --text /tmp/q.txt /tmp/q1 /tmp/q2
1473773034.873399 ERROR guestfs can't be launched
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 43, in open_archive
self.g.launch()
File "/usr/lib/python3/dist-packages/guestfs.py", line 5398, in launch
r = libguestfsmod.launch (self._o)
RuntimeError: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again. For further information, read:
http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.
1473773034.929533 ERROR If memory is too tight for 512 MiB, try running with LIBGUESTFS_MEMSIZE=256 or lower.
1473773035.369462 ERROR guestfs can't be launched
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 43, in open_archive
self.g.launch()
File "/usr/lib/python3/dist-packages/guestfs.py", line 5398, in launch
r = libguestfsmod.launch (self._o)
RuntimeError: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again. For further information, read:
http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.
1473773035.373510 ERROR If memory is too tight for 512 MiB, try running with LIBGUESTFS_MEMSIZE=256 or lower.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 246, in main
sys.exit(run_diffoscope(parsed_args))
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 217, in run_diffoscope
parsed_args.path1, parsed_args.path2)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 124, in compare_root_paths
return compare_directories(path1, path2)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 105, in compare_directories
return FilesystemDirectory(path1).compare(FilesystemDirectory(path2))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/directory.py", line 158, in compare
my_file, other_file, source=name)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 144, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 213, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 183, in _compare_using_details
details.extend(filter(None, self.as_container.compare(other.as_container)))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 147, in compare_commented_files
difference = compare_files(file1, file2, source=source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 144, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 213, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 183, in _compare_using_details
details.extend(filter(None, self.as_container.compare(other.as_container)))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 147, in compare_commented_files
difference = compare_files(file1, file2, source=source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 144, in compare_files
return file1.compare(file2, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 213, in compare
difference = self._compare_using_details(other, source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 183, in _compare_using_details
details.extend(filter(None, self.as_container.compare(other.as_container)))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 147, in compare_commented_files
difference = compare_files(file1, file2, source=source)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/__init__.py", line 133, in compare_files
if file1.has_same_content_as(file2):
File "/usr/lib/python3/dist-packages/diffoscope/__init__.py", line 64, in tool_check
return original_function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/binary.py", line 195, in has_same_content_as
my_size = os.path.getsize(self.path)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils.py", line 246, in path
self._path = self.container.extract(self._name, self._temp_dir.name)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 68, in extract
self.g.tar_out("/", dest_path)
File "/usr/lib/python3/dist-packages/guestfs.py", line 9307, in tar_out
r = libguestfsmod.tar_out (self._o, directory, tarfile, compress, numericowner, excludes, xattrs, selinux, acls)
RuntimeError: tar_out: call launch before using this function
(in guestfish, don't forget to use the 'run' command)
Exception ignored in: <bound method Archive.__del__ of <diffoscope.comparators.fsimage.FsImageContainer object at 0x7f2109003908>>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils.py", line 279, in __del__
self.close_archive()
File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 56, in close_archive
self.g.umount_all()
File "/usr/lib/python3/dist-packages/guestfs.py", line 9543, in umount_all
r = libguestfsmod.umount_all (self._o)
RuntimeError: umount_all: call launch before using this function
(in guestfish, don't forget to use the 'run' command)
Exception ignored in: <bound method Archive.__del__ of <diffoscope.comparators.fsimage.FsImageContainer object at 0x7f2108ffb3c8>>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils.py", line 279, in __del__
self.close_archive()
File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 56, in close_archive
self.g.umount_all()
File "/usr/lib/python3/dist-packages/guestfs.py", line 9543, in umount_all
r = libguestfsmod.umount_all (self._o)
RuntimeError: umount_all: call launch before using this function
(in guestfish, don't forget to use the 'run' command)
holger@profitbricks-build3-amd64:~$ ls /tmp/q1 /tmp/q2
/tmp/q1:
Qubes-DVD-x86_64-20160913.iso

/tmp/q2:
Qubes-DVD-x86_64-20160913.iso


Am I missing some dependencies or what does that mean and what should I do now?


--
cheers,
Holger
signature.asc

HW42

unread,
Sep 13, 2016, 10:40:03 AM9/13/16
to
Since guestfs works by running a modified kernel in an VM to parse the
file system, I think it fails to start the VM (nested virt disabled,
OOM, ...).

So I think you should first try if guestfs works at all (without
diffoscope) and/or enable the debug loggin like suggested in the error
message.

signature.asc

Mattia Rizzolo

unread,
Sep 13, 2016, 12:30:03 PM9/13/16
to
On Tue, Sep 13, 2016 at 03:35:58PM +0200, Holger Levsen wrote:
> so I build an Qubes ISO, twice and ran diffoscope against it:
>
> holger@profitbricks-build3-amd64:~$ sudo schroot --directory /tmp -c source:jenkins-reproducible-unstable-diffoscope diffoscope -- --html /tmp/q.html --text /tmp/q.txt /tmp/q1 /tmp/q2

I wanted to quickly try myself, but you already deleted the files.
Could you please save them somewhere (I suppose they are too big to be
attached to the bug?)
guestfs is not called directly, but through
ISTR the consensuos was in diffoscope printing an
error but continuing nonetheless (proposing an e.g. binary diff).

And reading the code suggest that it should do (it's catching
RuntimeError and returning back safely), but it is doing that only in
open_archive, not in e.g. close_archive which seems to be where the
actual crash is:

> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils.py", line 279, in __del__
> self.close_archive()
> File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 56, in close_archive
> self.g.umount_all()
> File "/usr/lib/python3/dist-packages/guestfs.py", line 9543, in umount_all
> r = libguestfsmod.umount_all (self._o)
> RuntimeError: umount_all: call launch before using this function
> (in guestfish, don't forget to use the 'run' command)
> Exception ignored in: <bound method Archive.__del__ of <diffoscope.comparators.fsimage.FsImageContainer object at 0x7f2108ffb3c8>>
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils.py", line 279, in __del__
> self.close_archive()
> File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 56, in close_archive
> self.g.umount_all()
> File "/usr/lib/python3/dist-packages/guestfs.py", line 9543, in umount_all
> r = libguestfsmod.umount_all (self._o)
> RuntimeError: umount_all: call launch before using this function
> (in guestfish, don't forget to use the 'run' command)

> Am I missing some dependencies or what does that mean and what should I do now?

If you want to compare it right now you might want to uninstall
python3-guestfs so it falls back to binary comparison, but that's
probably not that much helpful..

--
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`.
more about me: https://mapreri.org : :' :
Launchpad user: https://launchpad.net/~mapreri `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
signature.asc

Holger Levsen

unread,
Sep 13, 2016, 1:50:03 PM9/13/16
to
a.) I should definitly retry with debug logging…
b.) guestfs works on jenkins.d.n which is the same hardware (kvm…) and
the same software (jessie)


--
cheers,
Holger
signature.asc

Holger Levsen

unread,
Sep 13, 2016, 1:50:03 PM9/13/16
to
On Tue, Sep 13, 2016 at 04:22:29PM +0000, Mattia Rizzolo wrote:
> I wanted to quickly try myself, but you already deleted the files.
> Could you please save them somewhere (I suppose they are too big to be
> attached to the bug?)

they are in /home/holger/q(1|2) on pb3, please help yourself! :-)

> guestfs is not called directly, but through
> ISTR the consensuos was in diffoscope printing an
> error but continuing nonetheless (proposing an e.g. binary diff).
>
> And reading the code suggest that it should do (it's catching
> RuntimeError and returning back safely), but it is doing that only in
> open_archive, not in e.g. close_archive which seems to be where the
> actual crash is:
[...]
> If you want to compare it right now you might want to uninstall
> python3-guestfs so it falls back to binary comparison, but that's
> probably not that much helpful..

thanks but no thanks.

:)


--
cheers,
Holger, who still prefers old fashioned error messages over 50
lines of traceback in the users face
signature.asc

Holger Levsen

unread,
Sep 15, 2016, 5:40:03 AM9/15/16
to
On Thu, Sep 15, 2016 at 09:26:38AM +0000, Holger Levsen wrote:
> just now I enabled debugging like this:
> > export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1

I've now also tried with LIBGUESTFS_MEMSIZE=2048 just in case it needs
more memory. the result is again attached :)


--
cheers,
Holger
diffoscope-qubes-debug-2048
signature.asc

Holger Levsen

unread,
Sep 15, 2016, 5:40:03 AM9/15/16
to
On Tue, Sep 13, 2016 at 03:35:58PM +0200, Holger Levsen wrote:
> so I build an Qubes ISO, twice and ran diffoscope against it:

just now I enabled debugging like this:

> To see full error messages you may need to enable debugging.
> Do:
> export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1

the result is attached.


--
cheers,
Holger
diffoscope-qubes-debug
signature.asc

Holger Levsen

unread,
Sep 15, 2016, 10:10:03 AM9/15/16
to
Hi,

these qubes ISO image files are (temporarily) now also available for download
at https://jenkins.debian.net/userContent/qubes/


--
cheers,
Holger
signature.asc

HW42

unread,
Sep 15, 2016, 11:10:03 AM9/15/16
to
Holger Levsen:
It fails to find a kernel for the VM image it creates on the fly:

diffoscope-qubes-debug:
> supermin: failed to find a suitable kernel (host_cpu=x86_64).
>
> I looked for kernels in /boot and modules in /lib/modules.
>
> If this is a Xen guest, and you only have Xen domU kernels
> installed, try installing a fullvirt kernel (only for
> supermin use, you shouldn't boot the Xen guest with it).
> libguestfs: trace: launch = -1 (error)
> 1473930826.096060 ERROR guestfs can't be launched

On what kind of VM is this run, and what kernels are installed?

signature.asc

Holger Levsen

unread,
Sep 15, 2016, 12:40:03 PM9/15/16
to
On Thu, Sep 15, 2016 at 02:58:00PM +0000, HW42 wrote:
> It fails to find a kernel for the VM image it creates on the fly:

ah, wow.

> diffoscope-qubes-debug:
> > supermin: failed to find a suitable kernel (host_cpu=x86_64).
> >
> > I looked for kernels in /boot and modules in /lib/modules.
> >
> > If this is a Xen guest, and you only have Xen domU kernels
> > installed, try installing a fullvirt kernel (only for
> > supermin use, you shouldn't boot the Xen guest with it).
> > libguestfs: trace: launch = -1 (error)
> > 1473930826.096060 ERROR guestfs can't be launched
>
> On what kind of VM is this run, and what kernels are installed?

3.16.0-4-amd64 is the kernel (so jessie standard), and the host this is
running on is a profitbricks VM, so running on kvm.


--
cheers,
Holger
signature.asc

HW42

unread,
Sep 15, 2016, 12:50:03 PM9/15/16
to
Holger Levsen:
I assume you have this kernel only installed on the VM not the chroot.
So try installing linux-image-amd64 _inside_ the chroot.

signature.asc

Holger Levsen

unread,
Sep 15, 2016, 1:40:02 PM9/15/16
to
On Thu, Sep 15, 2016 at 04:38:00PM +0000, HW42 wrote:
> > 3.16.0-4-amd64 is the kernel (so jessie standard), and the host this is
> > running on is a profitbricks VM, so running on kvm.
> I assume you have this kernel only installed on the VM not the chroot.
> So try installing linux-image-amd64 _inside_ the chroot.

the problem is, that this is a sid chroot, so linux-image would have
version 4.7.2, while the host has 3.16…


--
cheers,
Holger
signature.asc

HW42

unread,
Sep 15, 2016, 1:50:04 PM9/15/16
to
Holger Levsen:
I don't think this mismatch is a problem.

signature.asc

Chris Lamb

unread,
Dec 15, 2018, 10:10:06 AM12/15/18
to
forwarded 837681 https://salsa.debian.org/reproducible-builds/diffoscope/issues/3
thanks

I've forwarded this upstream here:

https://salsa.debian.org/reproducible-builds/diffoscope/issues/3


Regards,

--
,''`.
: :' : Chris Lamb
`. `'` la...@debian.org / chris-lamb.co.uk
`-
0 new messages