Bug#852013: diffoscope: (possible) regression in tempfile clean up

Mattia Rizzolo mattia at debian.org
Fri Jan 20 18:00:21 UTC 2017


package: diffoscope
version: 69
severity: important

If I run something like
    TMPDIR=temp diffoscope --debug 1 2
where 1 and 2 are/contains two .debs containing differing elf binaries,
and I happen to interrupt it (by sigTERMing it, be it with ^C by
keyboard or by using the `timeout` command) while it's dumping the
content of the elf files, diffoscope just forgets to remove the
temporary files it created:

% mkdir temp
% TMPDIR=temp timeout 45s diffoscope --debug 1 2
2017-01-20 18:46:57 D: diffoscope.main: Starting diffoscope 69
2017-01-20 18:46:57 D: diffoscope.locale: Normalising locale, timezone, etc.
2017-01-20 17:46:57 D: diffoscope.main: Starting comparison
[……]
2017-01-20 17:56:12 D: diffoscope.comparators.utils.command: Executing objdump --line-numbers --disassemble --demangle --section=.plt.got /home/mattia/pbuilder/result/unstable/amd64/temp/tmp0ca6peha_diffoscope/./usr/lib/paraview/libvtkChartsCorePython27D.so.1
2017-01-20 17:56:12 D: diffoscope.comparators.utils.command: objdump --line-numbers --disassemble --demangle --section=.plt.got /home/mattia/pbuilder/result/unstable/amd64/temp/tmp6nkl4rq5_diffoscope/./usr/lib/paraview/libvtkChartsCorePython27D.so.1 returned (exit code: 0)
2017-01-20 17:56:12 D: diffoscope.comparators.utils.command: objdump --line-numbers --disassemble --demangle --section=.plt.got /home/mattia/pbuilder/result/unstable/amd64/temp/tmp0ca6peha_diffoscope/./usr/lib/paraview/libvtkChartsCorePython27D.so.1 returned (exit code: 0)
2017-01-20 17:56:12 D: diffoscope.diff: Running diff -aU7 /home/mattia/pbuilder/result/unstable/amd64/temp/tmp4a3u3s0n/f1 /home/mattia/pbuilder/result/unstable/amd64/temp/tmp4a3u3s0n/f2
2017-01-20 17:56:12 D: diffoscope.diff: diff -aU7 /home/mattia/pbuilder/result/unstable/amd64/temp/tmp4a3u3s0n/f1 /home/mattia/pbuilder/result/unstable/amd64/temp/tmp4a3u3s0n/f2: returncode 0, parsed True
2017-01-20 17:56:12 D: diffoscope.comparators.utils.compare: Comparing files <<class 'diffoscope.comparators.elf.ElfCodeSection'> .text> and <<class 'diffoscope.comparators.elf.ElfCodeSection'> .text>
2017-01-20 17:56:12 D: diffoscope.comparators.utils.command: Executing objdump --line-numbers --disassemble --demangle --section=.text /home/mattia/pbuilder/result/unstable/amd64/temp/tmp6nkl4rq5_diffoscope/./usr/lib/paraview/libvtkChartsCorePython27D.so.1
2017-01-20 17:56:12 D: diffoscope.comparators.utils.command: Executing objdump --line-numbers --disassemble --demangle --section=.text /home/mattia/pbuilder/result/unstable/amd64/temp/tmp0ca6peha_diffoscope/./usr/lib/paraview/libvtkChartsCorePython27D.so.1
TMPDIR=temp timeout 45s diffoscope --debug 1 2  42.34s user 7.83s system 111% cpu 45.006 total
% ls -1 temp|wc -l
81
%

(last line is my shell telling me how much time it took)


Now, this doesn't happen always, and in my limited testing it seemed to
happen only when interrupting objdump (??!?).  That said, it's worsening
disk space problems on jenkins, as it leaves huge files around for way
longer than usual, until garbage collected by something else.

-- 
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  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20170120/af9681db/attachment.sig>


More information about the Reproducible-builds mailing list