Bug#901982: diffoscope: crash comparing ext4 filesystems: AttributeError: 'FsImageContainer' object has no attribute 'g'

Cyril Brulebois kibi at debian.org
Sat Jan 19 21:58:51 GMT 2019


Hi,

Paul Wise <pabs at debian.org> (2018-06-21):
> $ diffoscope foo.ext4.initial foo.ext4.mount
> Traceback (most recent call last):#####################################################################################################|  100%                             ETA:  0:00:00 
>   File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 460, in main
>     sys.exit(run_diffoscope(parsed_args))
>   File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 432, in run_diffoscope
>     difference = compare_root_paths(path1, path2)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 68, in compare_root_paths
>     difference = compare_files(file1, file2)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 118, in compare_files
>     return file1.compare(file2, source)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 366, in compare
>     difference = self._compare_using_details(other, source)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 321, in _compare_using_details
>     other.as_container, no_recurse=no_recurse))
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 131, in comparisons
>     my_members = OrderedDict(self.get_adjusted_members_sizes())
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 127, in get_adjusted_members_sizes
>     size = path_apparent_size(member.path)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/archive.py", line 99, in path
>     self._name, self._temp_dir.name)
>   File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 74, in extract
>     self.g.tar_out('/', dest_path)
> AttributeError: 'FsImageContainer' object has no attribute 'g'

FWIW I'm also seeing this in unstable when trying to compare two
boot.img.gz files produced as part of a debian-installer builder:

    (sid-amd64-devel)kibi at wodi:~/debian-installer$ diffoscope d-i-[89]/extract/installer-amd64/20190119/images/hd-media/boot.img.gz
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 504, in main
        sys.exit(run_diffoscope(parsed_args))
      File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 476, in run_diffoscope
        difference = compare_root_paths(path1, path2)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 68, in compare_root_paths
        difference = compare_files(file1, file2)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 118, in compare_files
        return file1.compare(file2, source)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 370, in compare
        difference = self._compare_using_details(other, source)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 325, in _compare_using_details
        other.as_container, no_recurse=no_recurse))
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 179, in compare_pair
        file1, file2, source=None, diff_content_only=no_recurse)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 118, in compare_files
        return file1.compare(file2, source)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 370, in compare
        difference = self._compare_using_details(other, source)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 325, in _compare_using_details
        other.as_container, no_recurse=no_recurse))
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 131, in comparisons
        my_members = OrderedDict(self.get_adjusted_members_sizes())
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 127, in get_adjusted_members_sizes
        size = path_apparent_size(member.path)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/archive.py", line 99, in path
        self._name, self._temp_dir.name)
      File "/usr/lib/python3/dist-packages/diffoscope/comparators/fsimage.py", line 74, in extract
        self.g.tar_out('/', dest_path)
    AttributeError: 'FsImageContainer' object has no attribute 'g'

This is with diffoscope 108.


Interestingly, my host using stretch-backports's version (108~bpo9+1)
doesn't seem affected. Might this be related to missing, external tools?

My sid chroot reports:

    External-Tools-Required: Rscript, apktool, bsdtar, cbfstool, cd-iccdump, compare, convert, docx2txt, enjarify, fdtdump, ghc, gifbuild, identify, img2txt, js-beautify, lipo, llvm-bcanalyzer, llvm-dis, odt2txt, oggDump, otool, pdftotext, pedump, pgpdump, ppudump, showttf, sng, sqlite3, tcpdump, unsquashfs, wasm2wat
    Available-in-Debian-packages: apktool, caca-utils, colord, device-tree-compiler, docx2txt, enjarify, fontforge-extras, fp-utils, ghc, giflib-tools, imagemagick, jsbeautifier, libarchive-tools, llvm, mono-utils, odt2txt, oggvideotools, pgpdump, poppler-utils, r-base-core, sng, sqlite3, squashfs-tools, tcpdump

while my stretch(+backports) host reports:

    External-Tools-Required: cbfstool, lipo, otool, tcpdump, wasm2wat
    Available-in-Debian-packages: tcpdump

or could it be due to being used within a schroot session?


Cheers,
-- 
Cyril Brulebois (kibi at debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-builds/attachments/20190119/e246ad4e/attachment.sig>


More information about the Reproducible-builds mailing list