Crash comparing ext4 filesystems: AttributeError: 'FsImageContainer' object has no attribute 'g'
This bug was originally reported by Paul Wise (pabs@debian.org) in Debian bug #901982:
Package: diffoscope
Version: 96
Severity: normal
Usertags: crash
diffoscope crashes when comparing ext4 filesystems:
$ truncate -s 1M foo.ext4.initial
$ /sbin/mkfs.ext4 foo.ext4.initial
mke2fs 1.44.2 (14-May-2018)
Filesystem too small for a journal
Discarding device blocks: done =20
Creating filesystem with 1024 1k blocks and 128 inodes
Allocating group tables: done =20
Writing inode tables: done =20
Writing superblocks and filesystem accounting information: done
$ cp foo.ext4.initial foo.ext4.mount
$ mkdir foo.ext4.mountdir
$ sudo mount foo.ext4.mount foo.ext4.mountdir
$ sudo umount foo.ext4.mountdir
$ diffoscope foo.ext4.initial foo.ext4.mount
Traceback (most recent call last):#########################################=
############################################################| 100% =
ETA: 0:00:00=20
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 460, in ma=
in
sys.exit(run_diffoscope(parsed_args))
File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 432, in ru=
n_diffoscope
difference =3D compare_root_paths(path1, path2)
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare=
.py", line 68, in compare_root_paths
difference =3D 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 =3D 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=3Dno_recurse))
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/contain=
er.py", line 131, in comparisons
my_members =3D OrderedDict(self.get_adjusted_members_sizes())
File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/contain=
er.py", line 127, in get_adjusted_members_sizes
size =3D 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'