GNU bug report logs - #75658
Non-deterministic Gash error in ‘gcc-mesboot-4.9.4’

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Sat, 18 Jan 2025 22:09:01 UTC

Severity: important

Full log


Message #33 received at 75658 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: 75658 <at> debbugs.gnu.org, Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: Re: bug#75658: Non-deterministic Gash error in
 ‘gcc-mesboot-4.9.4’
Date: Wed, 19 Mar 2025 22:27:15 +0100
[Message part 1 (text/plain, inline)]
Hello Timothy,

Ludovic Courtès <ludo <at> gnu.org> skribis:

> The hack below addresses that (mostly) by reserving low-number file
> descriptors before the signal and finalization threads create their
> pipe.  (In practice, we can only reserve FDs above 5; FDs 3 and 4 are
> the “sleep pipe” I believe.)

I’ve just sent cleaned-up patches to gash-devel including this
fix/workaround.

It passes my tests, meaning that I cannot reproduce the original bug in
a timely fashion when running:

  ./pre-inst-env gash -c 'exec 2>/dev/null; while true; do echo $(sh --version) > /dev/null; done'

or when running part of the GCC 4.9.4 ‘configure’ script in a loop
(attached is the helper script I used for that; not shown here is a
manual modification of said script so that it exits after “checking for
a sed that does not truncate output”, which was sufficient to reproduce
the bug, possibly after many iterations).

It would be great to cut a Gash release soonish as this bug has been
blocking the ‘core-packages-team’ branch for a while already.

Thanks,
Ludo’.

[gash-redirect-EBADF-reproducer.sh (text/plain, inline)]
#!/bin/sh
set -x
export COLUMNS=200
#STRACE="strace -s 100 -f -o log.strace"
PATCH=--with-patch=gash=$PWD/gash-redirect-EBADF.patch
export SHELL=$(guix build gash $PATCH)/bin/gash
export CONFIG_SHELL=$SHELL
OPTIONS="--prefix=/wherever --disable-bootstrap --disable-decimal-float --disable-libatomic --disable-libcilkrts --disable-libgomp --disable-libitm --disable-libmudflap --disable-libquadmath --disable-libsanitizer --disable-libssp --disable-libvtv --disable-lto --disable-lto-plugin --disable-multilib --disable-plugin --disable-threads --enable-languages=c,c++ --enable-static --enable-shared --enable-threads=single --disable-libstdcxx-pch --disable-build-with-cxx"

cd /data/src/gcc-4.9.4
while $STRACE $SHELL -e ./configure $OPTIONS $OPTIONS $OPTIONS
do
    grep fcntl.*EBADF log.strace && break
done

This bug report was last modified 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.