On 14/03/2026 20:20, Michael Kelly wrote:
On 13/03/2026 07:41, Samuel Thibault wrote:
Since I only notice this in haskell, that's possibly related to signal
delivery.
OK. So we're back to the stage of haskell package builds failing due
to the corruption of a shared library in a dependent package. The
recent build failures all show the same cause: corruption to the
shared library in libghc-hslogger-dev (libHShslogger.so). I downloaded
the version referenced by the buildd logs and comparing the shared
library to one compiled locally confirmed the same pattern
of corruption at offsets 0x50, 0x70 and 0xff0 of a single page.
I wasn't previously able to reproduce the corruption when compiling
libHShedgehog-classes but I'll try a script to repeatedly build (on
hurd-amd64) a variety of haskell packages and test the resulting
shared library for corruption after each build.
I ran a script for about 20 hours and didn't detect any corruption.
I have however spotted something that might be relevant. I've attached
the shell output from my virtual machine for clarity but essentially
stopping/continuing a process that writes to the file system can result
in corruption of the output. These are the tests:
1) Running 'dpkg-deb --fsys-tarfile' on a large .deb without
interruption demonstrating that the archive is valid. Running the same
but with a stop/cont from the shell results in the extraction detecting
an error and terminating.
2) Use tar to extract a large data.tar.xz (from the same large .deb
package) with around 5 instances of stop/cont from the shell. I then
extract the same a second time with the same method. A comparison of the
2 outputs resulted in differences. Just for sanity, extracting the same
archive twice without being interrupted results in identical outputs as
obviously expected.
This is all on hurd-amd64 however the same thing happens on hurd-i386.
SIGSTOP and SIGCONT are a bit special but it seems a little like what is
suspected to cause the corruption in the haskell builds.
That this happens on 32 bit counts against it being the same as the
haskell issue but in any case it's surely wrong ?
I'll look into what's happening unless someone advises me of my idiocy.
Regards,
Mike.
mike@rump-sigstop-x64:~/tmp$ ls
ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb
mike@rump-sigstop-x64:~/tmp$ dpkg-deb --fsys-tarfile ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb >/dev/null
mike@rump-sigstop-x64:~/tmp$
mike@rump-sigstop-x64:~/tmp$ dpkg-deb --fsys-tarfile ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb >/dev/null
^Z
[1]+ Stopped dpkg-deb --fsys-tarfile ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb > /dev/null
mike@rump-sigstop-x64:~/tmp$ fg
dpkg-deb --fsys-tarfile ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb > /dev/null
dpkg-deb (subprocess): decompressing archive 'ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb' (size=72507784) member 'data.tar': lzma error: compressed data is corrupt
dpkg-deb: error: <decompress> subprocess failed with exit status 2
mike@rump-sigstop-x64:~/tmp$ mkdir extract
mike@rump-sigstop-x64:~/tmp$ cd extract/
mike@rump-sigstop-x64:~/tmp/extract$ ar x ../ghc-prof_9.10.3-3+hurd.1_hurd-amd64.deb
mike@rump-sigstop-x64:~/tmp/extract$ ls
control.tar.xz data.tar.xz debian-binary
mike@rump-sigstop-x64:~/tmp/extract$ mkdir 1 2
mike@rump-sigstop-x64:~/tmp/extract$ cd 1
mike@rump-sigstop-x64:~/tmp/extract/1$ tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ fg
tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/1$ cd ../2
mike@rump-sigstop-x64:~/tmp/extract/2$ tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ fg
tar xf ../data.tar.xz
^Z
[1]+ Stopped tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ fg
tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/2$ cd ..
mike@rump-sigstop-x64:~/tmp/extract$ diff -r 1 2
Binary files 1/usr/lib/ghc/lib/x86_64-hurd-ghc-9.10.3/Cabal-3.12.1.0-inplace/Distribution/Simple/Setup/Build.p_hi and 2/usr/lib/ghc/lib/x86_64-hurd-ghc-9.10.3/Cabal-3.12.1.0-inplace/Distribution/Simple/Setup/Build.p_hi differ
Binary files 1/usr/lib/ghc/lib/x86_64-hurd-ghc-9.10.3/Cabal-syntax-3.12.1.0-inplace/libHSCabal-syntax-3.12.1.0-inplace_p.a and 2/usr/lib/ghc/lib/x86_64-hurd-ghc-9.10.3/Cabal-syntax-3.12.1.0-inplace/libHSCabal-syntax-3.12.1.0-inplace_p.a differ
mike@rump-sigstop-x64:~/tmp/extract$ mkdir 3 4
mike@rump-sigstop-x64:~/tmp/extract$ cd 3
mike@rump-sigstop-x64:~/tmp/extract/3$ tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/3$ cd ../4
mike@rump-sigstop-x64:~/tmp/extract/4$ tar xf ../data.tar.xz
mike@rump-sigstop-x64:~/tmp/extract/4$ cd ..
mike@rump-sigstop-x64:~/tmp/extract$ diff -r 3 4
mike@rump-sigstop-x64:~/tmp/extract$