public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/106162] New: libstdc++v3: bits/largefile-config.h.tmp: No such file or directory race condition
@ 2022-07-01 18:10 slyfox at gcc dot gnu.org
  2022-07-01 18:11 ` [Bug libstdc++/106162] " slyfox at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-07-01 18:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106162

            Bug ID: 106162
           Summary: libstdc++v3: bits/largefile-config.h.tmp: No such file
                    or directory race condition
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
                CC: jwakely.gcc at gmail dot com
  Target Milestone: ---

There is a race condition when (I speculate) libstdcv++v3 is built in parallel
from different 'make' processes. Perhaps for c++98 | c++11 | x++17 instances?

>From libstdc++-v3/include/Makefile.am:

  # This header is not installed, it's only used to build libstdc++ itself.
  ${host_builddir}/largefile-config.h: ${CONFIG_HEADER}
        @rm -f $@.tmp
        @-grep 'define _DARWIN_USE_64_BIT_INODE' ${CONFIG_HEADER} >> $@.tmp
        @-grep 'define _FILE_OFFSET_BITS' ${CONFIG_HEADER} >> $@.tmp
        @-grep 'define _LARGE_FILES' ${CONFIG_HEADER} >> $@.tmp
        @mv $@.tmp $@

As a result 'bits/largefile-config.h' rule gets executed in parallel and
clobbers temporary file on this week's gcc-13 snapshot:

...
make[3]: Entering directory '/build/build/x86_64-w64-mingw32/libstdc++-v3'
Making all in include
make[4]: Entering directory
'/build/build/x86_64-w64-mingw32/libstdc++-v3/include'
echo 1 > stamp-dual-abi
echo 1 > stamp-allocator-new
echo timestamp > stamp-pb
echo 1 > stamp-cxx11-abi
echo 0 > stamp-visibility
echo 1 > stamp-extern-template
echo 0 > stamp-namespace-version
echo 'define _GLIBCXX_USE_FLOAT128 1' > stamp-float128
/nix/store/xsq6y0yn5mbmyazn51c86kz9zkr357xj-bash-5.1-p16/bin/bash: line 1:
x86_64-w64-mingw32/bits/largefile-config.h.tmp: No such file or directory
make[4]: [Makefile:1785: x86_64-w64-mingw32/bits/largefile-config.h] Error 1
(ignored) shuffle=1656692854
/nix/store/xsq6y0yn5mbmyazn51c86kz9zkr357xj-bash-5.1-p16/bin/bash: line 1:
x86_64-w64-mingw32/bits/largefile-config.h.tmp: No such file or directory
make[4]: [Makefile:1786: x86_64-w64-mingw32/bits/largefile-config.h] Error 1
(ignored) shuffle=1656692854
/nix/store/xsq6y0yn5mbmyazn51c86kz9zkr357xj-bash-5.1-p16/bin/bash: line 1:
x86_64-w64-mingw32/bits/largefile-config.h.tmp: No such file or directory
make[4]: [Makefile:1787: x86_64-w64-mingw32/bits/largefile-config.h] Error 1
(ignored) shuffle=1656692854
mv: cannot stat 'x86_64-w64-mingw32/bits/largefile-config.h.tmp': No such file
or directory
make[4]: *** [Makefile:1788: x86_64-w64-mingw32/bits/largefile-config.h] Error
1 shuffle=1656692854
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory
'/build/build/x86_64-w64-mingw32/libstdc++-v3/include'
make[3]: *** [Makefile:576: all-recursive] Error 1 shuffle=1656692854
make[3]: Leaving directory '/build/build/x86_64-w64-mingw32/libstdc++-v3'
make[2]: *** [Makefile:501: all] Error 2 shuffle=1656692854
make[2]: Leaving directory '/build/build/x86_64-w64-mingw32/libstdc++-v3'
make[1]: *** [Makefile:12287: all-target-libstdc++-v3] Error 2
shuffle=1656692854
make[1]: Leaving directory '/build/build'
make: *** [Makefile:1031: all] Error 2 shuffle=1656692854

Note how 'largefile-config.h.tmp: No such file or directory' is reported 3
times.

Will attach full build.log in case it makes the error cause clearer.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-07-23 17:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 18:10 [Bug libstdc++/106162] New: libstdc++v3: bits/largefile-config.h.tmp: No such file or directory race condition slyfox at gcc dot gnu.org
2022-07-01 18:11 ` [Bug libstdc++/106162] " slyfox at gcc dot gnu.org
2022-07-01 20:49 ` redi at gcc dot gnu.org
2022-07-01 20:51 ` redi at gcc dot gnu.org
2022-07-01 20:54 ` redi at gcc dot gnu.org
2022-07-01 21:29 ` redi at gcc dot gnu.org
2022-07-01 21:40 ` slyfox at gcc dot gnu.org
2022-07-01 21:43 ` cvs-commit at gcc dot gnu.org
2022-07-01 21:43 ` redi at gcc dot gnu.org
2022-07-01 21:43 ` redi at gcc dot gnu.org
2022-07-07 20:39 ` cvs-commit at gcc dot gnu.org
2022-07-07 23:33 ` cvs-commit at gcc dot gnu.org
2022-07-07 23:37 ` redi at gcc dot gnu.org
2022-07-23 11:30 ` cvs-commit at gcc dot gnu.org
2022-07-23 17:35 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).