Bug#1066991: easy way to crash diffoscope

Holger Levsen holger at layer-acht.org
Sat Mar 16 16:01:52 GMT 2024


package: diffoscope
version: 240

hi,

crashing diffoscope in under 2min (the package build takes 42sec here).

$ apt source golang-github-stvp-tempredis 
$ sudo pbuilder build golang-github-stvp-tempredis_0.0~git20231107.8a695b6-1.dsc
$ mkdir p1 ; mv /var/cache/pbuilder/unstable/result/* p1/
$ sudo pbuilder build golang-github-stvp-tempredis_0.0~git20231107.8a695b6-1.dsc
$ mkdir p2 ; mv /var/cache/pbuilder/unstable/result/* p2/
$ diffoscope p1/golang-github-stvp-tempredis_0.0~git20231107.8a695b6-1_amd64.changes p2/golang-github-stvp-tempredis_0.0~git20231107.8a695b6-1_amd64.changes 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 767, in main
    sys.exit(run_diffoscope(parsed_args))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/main.py", line 718, in run_diffoscope
    difference = compare_root_paths(path1, path2)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 69, in compare_root_paths
    difference = compare_files(file1, file2)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 149, in compare_files
    return file1.compare(file2, source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/debian.py", line 275, in compare
    differences = super().compare(other, *args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 532, in compare
    difference = self._compare_using_details(other, source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 467, in _compare_using_details
    details.extend(
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 197, in compare_pair
    difference = compare_files(
                 ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 149, in compare_files
    return file1.compare(file2, source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 532, in compare
    difference = self._compare_using_details(other, source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 467, in _compare_using_details
    details.extend(
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 197, in compare_pair
    difference = compare_files(
                 ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 149, in compare_files
    return file1.compare(file2, source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 532, in compare
    difference = self._compare_using_details(other, source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 467, in _compare_using_details
    details.extend(
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 197, in compare_pair
    difference = compare_files(
                 ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 149, in compare_files
    return file1.compare(file2, source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 532, in compare
    difference = self._compare_using_details(other, source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 467, in _compare_using_details
    details.extend(
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/container.py", line 197, in compare_pair
    difference = compare_files(
                 ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/compare.py", line 149, in compare_files
    return file1.compare(file2, source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 532, in compare
    difference = self._compare_using_details(other, source)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/file.py", line 433, in _compare_using_details
    details.extend(self.compare_details(other, source))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/rdata.py", line 166, in compare_details
    a = get_module_path_for_rdb(self, tmpdir, "a")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/rdata.py", line 99, in get_module_path_for_rdb
    rdx = rdb.container.get_member(rdx_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/utils/libarchive.py", line 283, in get_member
    raise KeyError(f"{member_name} not found in archive")
KeyError: './usr/share/gocode/src/github.com/stvp/tempredis/dump.rdx not found in archive'
$ echo $?
2

This happens with both diffoscope in stable and unstable.

Noticed via https://tests.reproducible-builds.org/debian/index_breakages.html


-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

I'm looking forward to Corona being a beer again and Donald a duck.
-------------- 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/20240316/914e624e/attachment.sig>


More information about the Reproducible-builds mailing list