Non-deterministic Gash error in ‘gcc-mesboot-4.9.4’

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important

Debbugs page

Ludovic Courtès wrote 2 months ago
Non-deterministic Gash error in ‘gcc-mesboot-4 .9.4’
(address . bug-guix@gnu.org)
87msfnsrli.fsf@inria.fr
Hello,

I stumbled upon this interesting non-deterministic failure while
building ‘gcc-mesboot-4.9.4.drv’ on current ‘core-packages-team’ (which
is unchanged compared to ‘master’):

Toggle snippet (88 lines)
source directory: "/tmp/guix-build-gcc-mesboot-4.9.4.drv-0/gcc-4.9.4" (relative from build: ".")
build directory: "/tmp/guix-build-gcc-mesboot-4.9.4.drv-0/gcc-4.9.4"
configure flags: ("CONFIG_SHELL=/gnu/store/bhmkf29xki04mmydpm0axpbh35md4vfb-gash-boot-0.3.0/bin/bash" "SHELL=/gnu/store/bhmkf29xki04mmydpm0axpbh35md4vfb-gash-boot-0.3.0/bin/bash" "--prefix=/gnu/store/mgbd56zvid129vkk8l9zir7pf46r5038-gcc-mesboot-4.9.4" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--prefix=/gnu/store/mgbd56zvid129vkk8l9zir7pf46r5038-gcc-mesboot-4.9.4" "--build=i686-unknown-linux-gnu" "--host=i686-unknown-linux-gnu" "--with-host-libstdcxx=-lsupc++" "--with-native-system-header-dir=/gnu/store/qxp7icgwbn1hqqwvkan7aljgzfn439zh-glibc-mesboot-2.16.0/include" "--with-build-sysroot=/gnu/store/qxp7icgwbn1hqqwvkan7aljgzfn439zh-glibc-mesboot-2.16.0/include" "--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")
Backtrace:
In gash/eval.scm:
221: 19 [eval-sh (<sh-set!> ("ac_useropt" (<sh-cmd-sub> #)))]
In srfi/srfi-1.scm:
642: 18 [for-each #<procedure 1502320 at gash/eval.scm:221:17 (name word)> # #]
In gash/eval.scm:
222: 17 [#<procedure 1502320 at gash/eval.scm:221:17 (name word)> "ac_useropt" #]
131: 16 [eval-word (<sh-cmd-sub> (<sh-pipeline> # #)) #:output string ...]
121: 15 [expand-word (<sh-cmd-sub> (<sh-pipeline> # #)) #:output string ...]
In gash/shell.scm:
289: 14 [sh:substitute-command #<procedure 15022a0 at gash/eval.scm:129:35 ()>]
270: 13 [%subshell #<procedure v ()>]
In ice-9/boot-9.scm:
157: 12 [catch quit #<procedure v ()> ...]
In ice-9/r4rs.scm:
176: 11 [with-output-to-port #<variable 13a02e0 value: #<output: file 39>> ...]
In srfi/srfi-1.scm:
619: 10 [for-each #<procedure eval-sh (exp)> ((<sh-pipeline> # #))]
In gash/shell.scm:
344: 9 [sh:pipeline #<procedure 1506f40 at gash/eval.scm:149:6 ()> ...]
310: 8 [plumb #<input: #{read pipe}# 36> #f ...]
270: 7 [%subshell #<procedure thunk* ()>]
In ice-9/boot-9.scm:
157: 6 [catch quit #<procedure thunk* ()> ...]
In gash/shell.scm:
316: 5 [thunk*]
129: 4 [sh:exec-let () "sed" "s/[-+.]/_/g"]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
616: 2 [for-each #<procedure ec3b20 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<input: file 38> "r" 7]
In unknown file:
?: 0 [fdopen 7 "r"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor
Backtrace:
In gash/eval.scm:
221: 19 [eval-sh (<sh-set!> ("ac_useropt" (<sh-cmd-sub> #)))]
In srfi/srfi-1.scm:
642: 18 [for-each #<procedure 1502320 at gash/eval.scm:221:17 (name word)> # #]
In gash/eval.scm:
222: 17 [#<procedure 1502320 at gash/eval.scm:221:17 (name word)> "ac_useropt" #]
131: 16 [eval-word (<sh-cmd-sub> (<sh-pipeline> # #)) #:output string ...]
121: 15 [expand-word (<sh-cmd-sub> (<sh-pipeline> # #)) #:output string ...]
In gash/shell.scm:
289: 14 [sh:substitute-command #<procedure 15022a0 at gash/eval.scm:129:35 ()>]
270: 13 [%subshell #<procedure v ()>]
In ice-9/boot-9.scm:
157: 12 [catch quit #<procedure v ()> ...]
In ice-9/r4rs.scm:
176: 11 [with-output-to-port #<variable 13a02e0 value: #<output: file 39>> ...]
In srfi/srfi-1.scm:
619: 10 [for-each #<procedure eval-sh (exp)> ((<sh-pipeline> # #))]
In gash/shell.scm:
347: 9 [sh:pipeline #<procedure 1506f40 at gash/eval.scm:149:6 ()> ...]
310: 8 [plumb #f #<output: #{write pipe}# 38> ...]
270: 7 [%subshell #<procedure thunk* ()>]
In ice-9/boot-9.scm:
157: 6 [catch quit #<procedure thunk* ()> ...]
In gash/shell.scm:
316: 5 [thunk*]
129: 4 [sh:exec-let () "printf" "%s\\n" "libsanitizer"]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
616: 2 [for-each #<procedure ec3b20 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<input: file 36> "r" 7]
In unknown file:
?: 0 [fdopen 7 "r"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor
checking build system type... i686-unknown-linux-gnu
checking host system type... i686-unknown-linux-gnu
checking target system type... i686-unknown-linux-gnu
checking for a BSD-compatible install... ./install-sh -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /gnu/store/i61mvrw30k8ng8hxym8s180nydnsbji6-gash-utils-boot-0.2.0/bin/sed
checking for gawk... gawk
checking for libsanitizer support... yes

What happens is that Gash crashes in the middle of a substitution on
$ac_useropt. As a result, ‘--disable-libsanitizer’ (and other options,
it seems) are discarded, hence the “libsanitizer support... yes” line.
Hours later, build fails while trying to build libsanitizer.

Any idea what could cause EBADF?

Thanks,
Ludo’.
Ludovic Courtès wrote 2 months ago
Re: bug#75658: Non-deterministic Gash error in ‘gcc-mesboot-4.9.4’
(address . 75658@debbugs.gnu.org)
87wmeqpspy.fsf@gnu.org
Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

Toggle quote (4 lines)
> I stumbled upon this interesting non-deterministic failure while
> building ‘gcc-mesboot-4.9.4.drv’ on current ‘core-packages-team’ (which
> is unchanged compared to ‘master’):

Just got another one:

Toggle snippet (46 lines)
checking for struct sigaction.sa_sigaction... yes
checking for volatile sig_atomic_t... yes
checking for sighandler_t... yes
checking for sigprocmask... (cached) yes
checking whether sleep is declared... yes
checking for working sleep... yes
checking for socklen_t... Backtrace:
In gash/shell.scm:
129: 19 [sh:exec-let () "ac_fn_c_try_compile" "2817"]
In gash/environment.scm:
215: 18 [save-variables-excursion () ...]
292: 17 [with-arguments # #<procedure 2210f00 at gash/shell.scm:145:25 ()>]
389: 16 [call-with-return #<procedure 2210e40 at gash/shell.scm:147:28 ()>]
In srfi/srfi-1.scm:
619: 15 [for-each #<procedure eval-sh (exp)> ((<sh-begin> # # # ...))]
619: 14 [for-each #<procedure eval-sh (exp)> (# # # # ...)]
In gash/shell.scm:
441: 13 [sh:cond # #]
55: 12 [without-errexit #<procedure 13185e0 at gash/eval.scm:149:6 ()>]
372: 11 [sh:and #<procedure 1318560 at gash/eval.scm:149:6 ()> ...]
55: 10 [without-errexit #<procedure 1318560 at gash/eval.scm:149:6 ()>]
372: 9 [sh:and #<procedure 1318500 at gash/eval.scm:149:6 ()> ...]
55: 8 [without-errexit #<procedure 1318500 at gash/eval.scm:149:6 ()>]
In srfi/srfi-1.scm:
616: 7 [for-each #<procedure eval-sh (exp)> (# # # # ...)]
619: 6 [for-each #<procedure eval-sh (exp)> (# # #)]
In gash/shell.scm:
245: 5 [#<procedure 1f63030 at gash/shell.scm:239:17 ()>]
129: 4 [sh:exec-let () "grep" "-v" "^ *+" "conftest.err"]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
616: 2 [for-each #<procedure ea9a60 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<input: file 20> "r" 7]
In unknown file:
?: 0 [fdopen 7 "r"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor
yes
checking whether symlink handles trailing slash correctly... yes
checking whether <sys/ioctl.h> declares ioctl... yes
checking for unsetenv... yes
checking for unsetenv() return type... int

That one likely doesn’t change the build outcome since it still
determines that ‘socklen_t’ is defined, but it sounds a bit like a dice
roll.

Ludo’.
Ludovic Courtès wrote 1 months ago
control message for bug #75518
(address . control@debbugs.gnu.org)
877c636r2f.fsf@gnu.org
block 75518 by 75658
quit
Ludovic Courtès wrote 3 weeks ago
control message for bug #75658
(address . control@debbugs.gnu.org)
87frkcl18h.fsf@gnu.org
severity 75658 important
quit
Ludovic Courtès wrote 20 hours ago
Re: bug#75658: Non-deterministic Gash error in ‘gcc-mesboot-4.9.4’
(address . 75658@debbugs.gnu.org)
87bju7i6rr.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (8 lines)
> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> I stumbled upon this interesting non-deterministic failure while
>> building ‘gcc-mesboot-4.9.4.drv’ on current ‘core-packages-team’ (which
>> is unchanged compared to ‘master’):
>
> Just got another one:

A few more, obtained by running the start of the ‘configure’ script in a
loop (added an ‘exit’ on line 2562, which is after the first 4 lines of
output).

while ./configure CONFIG_SHELL=/gnu/store/98bd49rhyia49y0b9d7sk8phsq14g3nk-gash-boot-0.3.0/bin/bash SHELL=/gnu/store/98bd49rhyia49y0b9d7sk8phsq14g3nk-gash-boot-0.3.0/bin/bash --prefix=/gnu/store/awkbdj5j41pv5kiy9ifs0zl40jamwfw4-gcc-mesboot-4.9.4 --enable-fast-install --build=x86_64-unknown-linux-gnu --prefix=/gnu/store/awkbdj5j41pv5kiy9ifs0zl40jamwfw4-gcc-mesboot-4.9.4 --build=i686-unknown-linux-gnu --host=i686-unknown-linux-gnu --with-host-libstdcxx=-lsupc++ --with-native-system-header-dir=/gnu/store/gc91zbacrk6prhvm91cj3x9rr3v2k17q-glibc-mesboot-2.16.0/include --with-build-sysroot=/gnu/store/gc91zbacrk6prhvm91cj3x9rr3v2k17q-glibc-mesboot-2.16.0/include --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 ; do : ;done

Toggle snippet (42 lines)
warning: failed to install locale: Invalid argument
Backtrace:
In gash/environment.scm:
371: 19 [call-with-break #<procedure 2dda9450 at gash/shell.scm:400:6 ()>]
In srfi/srfi-1.scm:
619: 18 [for-each #<procedure 2dda9420 at gash/shell.scm:401:18 (value)> #]
In gash/environment.scm:
353: 17 [call-with-continue #<procedure 2de13460 at gash/eval.scm:158:14 ()>]
In srfi/srfi-1.scm:
616: 16 [for-each #<procedure eval-sh (exp)> (# # #)]
619: 15 [for-each #<procedure eval-sh (exp)> ((<sh-set!> ("ac_optarg" #)))]
In gash/eval.scm:
221: 14 [eval-sh (<sh-set!> ("ac_optarg" (<sh-cmd-sub> #)))]
In srfi/srfi-1.scm:
642: 13 [for-each #<procedure 2da0f5e0 at gash/eval.scm:221:17 (name word)> # #]
In gash/eval.scm:
222: 12 [#<procedure 2da0f5e0 at gash/eval.scm:221:17 (name word)> "ac_optarg" #]
131: 11 [eval-word (<sh-cmd-sub> (<sh-exec> "expr" # ":" ...)) #:output string ...]
121: 10 [expand-word (<sh-cmd-sub> (<sh-exec> "expr" # ...)) #:output ...]
In gash/shell.scm:
289: 9 [sh:substitute-command #<procedure 2da0f560 at gash/eval.scm:129:35 ()>]
270: 8 [%subshell #<procedure v ()>]
In ice-9/boot-9.scm:
157: 7 [catch quit #<procedure v ()> ...]
In ice-9/r4rs.scm:
176: 6 [with-output-to-port #<variable 2de5dc00 value: #<output: file /dev/pts/19>> ...]
In srfi/srfi-1.scm:
619: 5 [for-each #<procedure eval-sh (exp)> ((<sh-exec> "expr" # ":" ...))]
In gash/shell.scm:
129: 4 [sh:exec-let () "expr" ...]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
616: 2 [for-each #<procedure 2d60f0a0 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<input: file /dev/pts/19> "r0" 7]
In unknown file:
?: 0 [fdopen 7 "r0"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor

And:

Toggle snippet (39 lines)
Backtrace:
In ice-9/boot-9.scm:
157: 17 [catch #t #<catch-closure 25cdf0a0> ...]
In unknown file:
?: 16 [apply-smob/1 #<catch-closure 25cdf0a0>]
In ice-9/boot-9.scm:
63: 15 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 14 [eval # #]
In ice-9/boot-9.scm:
793: 13 [call-with-input-file "./configure" ...]
In gash/gash.scm:
121: 12 [#<procedure 262f7700 at gash/gash.scm:120:19 (port)> #<input: ./configure 5>]
In gash/repl.scm:
38: 11 [run-repl #<input: ./configure 5> #f]
In gash/environment.scm:
371: 10 [call-with-break #<procedure 26335c00 at gash/shell.scm:400:6 ()>]
In srfi/srfi-1.scm:
616: 9 [for-each #<procedure 26335bd0 at gash/shell.scm:401:18 (value)> #]
In gash/environment.scm:
353: 8 [call-with-continue #<procedure 26315260 at gash/eval.scm:158:14 ()>]
In srfi/srfi-1.scm:
619: 7 [for-each #<procedure eval-sh (exp)> (# # #)]
In gash/shell.scm:
441: 6 [sh:cond #]
55: 5 [without-errexit #<procedure 26861c80 at gash/eval.scm:149:6 ()>]
129: 4 [sh:exec-let () "test" "-n" ""]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
619: 2 [for-each #<procedure 26272b60 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<output: file /dev/pts/19> "w0" 6]
In unknown file:
?: 0 [fdopen 6 "w0"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor

And:

Toggle snippet (31 lines)
Backtrace:
In ice-9/boot-9.scm:
157: 13 [catch #t #<catch-closure 1879d00> ...]
In unknown file:
?: 12 [apply-smob/1 #<catch-closure 1879d00>]
In ice-9/boot-9.scm:
63: 11 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 10 [eval # #]
In ice-9/boot-9.scm:
793: 9 [call-with-input-file "./configure" ...]
In gash/gash.scm:
121: 8 [#<procedure 1e905e0 at gash/gash.scm:120:19 (port)> #<input: ./configure 5>]
In gash/repl.scm:
38: 7 [run-repl #<input: ./configure 5> #f]
In gash/shell.scm:
441: 6 [sh:cond #]
55: 5 [without-errexit #<procedure 2192680 at gash/eval.scm:149:6 ()>]
129: 4 [sh:exec-let () "test" "xi686-unknown-linux-gnu" "!=" "x"]
92: 3 [exec-utility () ...]
In srfi/srfi-1.scm:
619: 2 [for-each #<procedure 1e06920 at gash/shell.scm:70:12 (i)> (0 1 2 ...)]
In ice-9/boot-9.scm:
1473: 1 [dup->port #<output: file /dev/pts/19> "w0" 6]
In unknown file:
?: 0 [fdopen 6 "w0"]

ERROR: In procedure fdopen:
ERROR: In procedure scm_fdes_to_port: Bad file descriptor

All these happen before the line:

Toggle snippet (3 lines)
checking build system type... i686-unknown-linux-gnu

Good news: I was able to reproduce with Gash over Guile 3.0.9:

Toggle snippet (44 lines)
ludo@ribbon /tmp/guix-build-gcc-mesboot-4.9.4.drv-0/gcc-4.9.4$ guix build gash
/gnu/store/mz5swdf35iwplrgdvm4z256py585nxi6-gash-0.3.0
ludo@ribbon /tmp/guix-build-gcc-mesboot-4.9.4.drv-0/gcc-4.9.4$ while /gnu/store/mz5swdf35iwplrgdvm4z256py585nxi6-gash-0.3.0/bin/gash ./configure CONFIG_SHELL=/gnu/store/98bd49rhyia49y0b9d7sk8phsq14g3nk-gash-boot-0.3.0/bin/bash SHELL=/gnu/store/98bd49rhyia49y0b9d7sk8phsq14g3nk-gash-boot-0.3.0/bin/bash --prefix=/gnu/store/awkbdj5j41pv5kiy9ifs0zl40jamwfw4-gcc-mesboot-4.9.4 --enable-fast-install --build=x86_64-unknown-linux-gnu --prefix=/gnu/store/awkbdj5j41pv5kiy9ifs0zl40jamwfw4-gcc-mesboot-4.9.4 --build=i686-unknown-linux-gnu --host=i686-unknown-linux-gnu --with-host-libstdcxx=-lsupc++ --with-native-system-header-dir=/gnu/store/gc91zbacrk6prhvm91cj3x9rr3v2k17q-glibc-mesboot-2.16.0/include --with-build-sysroot=/gnu/store/gc91zbacrk6prhvm91cj3x9rr3v2k17q-glibc-mesboot-2.16.0/include --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 ; do : ;done
[…]
Backtrace:
In ice-9/boot-9.scm:
1752:10 18 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
17 (apply-smob/0 #<thunk 7f8e78d15300>)
In ice-9/boot-9.scm:
724:2 16 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 15 (_ #(#(#<directory (guile-user) 7f8e78d18c80>)))
In ice-9/ports.scm:
433:17 14 (call-with-input-file _ _ #:binary _ #:encoding _ #:guess-encoding _)
In gash/gash.scm:
121:27 13 (_ _)
In gash/repl.scm:
38:14 12 (run-repl _ _)
In gash/environment.scm:
375:8 11 (call-with-break _)
In srfi/srfi-1.scm:
634:9 10 (for-each #<procedure 7f8e75612420 at gash/shell.scm:401:18 (value)> _)
In gash/environment.scm:
357:8 9 (call-with-continue _)
In srfi/srfi-1.scm:
634:9 8 (for-each #<procedure eval-sh (exp)> _)
634:9 7 (for-each #<procedure eval-sh (exp)> _)
In gash/shell.scm:
55:39 6 (sh:and _ #<procedure 7f8e75656da0 at gash/eval.scm:149:6 ()>)
245:24 5 (_)
159:10 4 (sh:exec-let _ "expr" . _)
92:9 3 (exec-utility _ "/run/current-system/profile/bin/expr" "expr" ("xliba…" …))
In srfi/srfi-1.scm:
634:9 2 (for-each #<procedure 7f8e760654c0 at gash/shell.scm:70:12 (i)> _)
In ice-9/ports.scm:
317:17 1 (dup->port _ _ _)
In unknown file:
0 (fdopen 6 "w0")

ERROR: In procedure fdopen:
In procedure scm_fdes_to_port: Bad file descriptor

Enough backtraces for now. To be continued…

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75658@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75658
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help