Hello. I tried to reproduce this and it looked as fixed in trixie to me, so I tried debbisect to determine the exact build-dependency which fixed it.
However, debbisect (which internally uses snapshot.debian.org) tells me that this issue did not even happen on 2023-08-13, the date at which the bug was filed. But there was something strange in the "successful" build log for such date: make[1]: Leaving directory '/gem-0.94' dpkg-source -b . dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building gem using existing ./gem_0.94.orig.tar.bz2 dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: building gem in gem_0.94-8.debian.tar.xz dpkg-source: info: building gem in gem_0.94-8.dsc dpkg-genbuildinfo --build=source -O../gem_0.94-8_source.buildinfo dpkg-genchanges --build=source -O../gem_0.94-8_source.changes dpkg-genchanges: info: not including original source code in upload dpkg-source --after-build . dpkg-buildpackage: info: source-only, diff-only upload (original source NOT included) I: waiting for background processes to finish... I: PID 12882 exited with exit code 255 I: PID 12891 exited with exit code 255 I: PID 12900 exited with exit code 255 I: PID 12930 exited with exit code 255 I: PID 12940 exited with exit code 255 I: PID 12949 exited with exit code 255 I: PID 12958 exited with exit code 255 I: PID 13900 exited with exit code 0 I: cleaning package lists and apt cache... I: removing tempdir /tmp/mmdebstrap.H34O4VSvIW... I: success in 691.0229 seconds Could it be the case that the build leaves background processes running which may or may not make a source build after a binary to fail, in a randomly fashion? Thanks.

