public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/105561] New: Nondeterministic ICE on creation of bits/stdc++.h.gch/O2g.gch and bits/extc++.h.gch/O2g.gch
@ 2022-05-11 10:47 swilde@sha-bang.de
  2022-05-11 11:05 ` [Bug bootstrap/105561] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: swilde@sha-bang.de @ 2022-05-11 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105561
           Summary: Nondeterministic ICE on creation of
                    bits/stdc++.h.gch/O2g.gch and
                    bits/extc++.h.gch/O2g.gch
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: swilde@sha-bang.de
  Target Milestone: ---

I'm experiencing a strange, not deterministic ISE on creation of
bits/extc++.h.gch/O2g.gch and bits/stdc++.h.gch/O2g.gch during building
of gcc 12.1 on i386 NetBSD 9.2.

I know the following sounds like an hardware problem, but it certainly
is not, as it can be observed in the exactly same way on to totally
different hardwares:

1. A native system running NetBSD 9.2 (i386):
   Intel(R) Atom(TM) CPU N270   @ 1.60GHz
   2 GiB RAM

2. A virtual system running NetBSD 9.2 (i386):
   VirtualBox guest with
   11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
   16 GiB RAM (for the guest)

The symptoms are identical on both.

It happens during bootstraps well as during non boostrap compilation
with an already compiled gcc 12.1.

My configuration Options are:

../gcc-12.1.0/configure \
  --with-bugurl=https://github.com/jashandeep-sohi/libgccjit-pkg/issues \
  --enable-shared --enable-host-shared --enable-checking=release \
  --enable-languages=jit --disable-multilib --disable-libssp \
  --disable-lto --disable-libquadmath --disable-liboffloadmic \
  --disable-libada --disable-libsanitizer \
  --disable-libquadmath-support --disable-libgomp --disable-libvtv \
  --disable-libsanitizer --with-gmp=/usr/local --with-mpc=/usr/local \
  --with-mpfr=/usr/local 

Here is what happens (I'll choose bits/extc++.h.gch/O2g.gch as an
example, the exact same thing happens for bits/stdc++.h.gch/O2g.gch,
too):

The compilation fails like this:

8< ----------------------------------------------------------------------
[...]
/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc/xgcc
-shared-libgcc
-B/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc
-nostdinc++
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src/.libs
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/libsupc++/.libs
-B/usr/local/i386-unknown-netbsdelf9.2/bin/
-B/usr/local/i386-unknown-netbsdelf9.2/lib/ -isystem
/usr/local/i386-unknown-netbsdelf9.2/include -isystem
/usr/local/i386-unknown-netbsdelf9.2/sys-include   -fno-checking -x c++-header
-nostdinc++ -g -O2 
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include/i386-unknown-netbsdelf9.2
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include
-I/home/wilde/src/gcc-12.1.0/libstdc++-v3/libsupc++  -O2 -g
/home/wilde/src/gcc-12.1.0/libstdc++-v3/include/precompiled/extc++.h -o
i386-unknown-netbsdelf9.2/bits/extc++.h.gch/O2g.gch                             
xgcc: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://github.com/jashandeep-sohi/libgccjit-pkg/issues> for instructions.
gmake[5]: *** [Makefile:1904:
i386-unknown-netbsdelf9.2/bits/extc++.h.gch/O2g.gch] Error 4
gmake[5]: Leaving directory
'/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include'
gmake[4]: *** [Makefile:576: all-recursive] Error 1
gmake[4]: Leaving directory
'/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3'
gmake[3]: *** [Makefile:501: all] Error 2
gmake[3]: Leaving directory
'/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3'
gmake[2]: *** [Makefile:17355: all-stage1-target-libstdc++-v3] Error 2
gmake[2]: Leaving directory
'/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build'
gmake[1]: *** [Makefile:22332: stage1-bubble] Error 2
gmake[1]: Leaving directory
'/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build'
gmake: *** [Makefile:1067: all] Error 2
-------------------------------------------------------------------------

Then I try to compile the file by hand, which usually fails, too some
times, but eventually succeeds:

8< ----------------------------------------------------------------------
% cd
~/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include
% /home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc/xgcc
-shared-libgcc
-B/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc
-nostdinc++
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src/.libs
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/libsupc++/.libs
-B/usr/local/i386-unknown-netbsdelf9.2/bin/
-B/usr/local/i386-unknown-netbsdelf9.2/lib/ -isystem
/usr/local/i386-unknown-netbsdelf9.2/include -isystem
/usr/local/i386-unknown-netbsdelf9.2/sys-include   -fno-checking -x c++-header
-nostdinc++ -g -O2 
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include/i386-unknown-netbsdelf9.2
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include
-I/home/wilde/src/gcc-12.1.0/libstdc++-v3/libsupc++  -O2 -g
/home/wilde/src/gcc-12.1.0/libstdc++-v3/include/precompiled/extc++.h -o
i386-unknown-netbsdelf9.2/bits/extc++.h.gch/O2g.gch
xgcc: internal compiler error: Bus error signal terminated program cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://github.com/jashandeep-sohi/libgccjit-pkg/issues> for instructions.
% /home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc/xgcc
-shared-libgcc
-B/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/./gcc
-nostdinc++
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/src/.libs
-L/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/libsupc++/.libs
-B/usr/local/i386-unknown-netbsdelf9.2/bin/
-B/usr/local/i386-unknown-netbsdelf9.2/lib/ -isystem
/usr/local/i386-unknown-netbsdelf9.2/include -isystem
/usr/local/i386-unknown-netbsdelf9.2/sys-include   -fno-checking -x c++-header
-nostdinc++ -g -O2 
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include/i386-unknown-netbsdelf9.2
-I/home/wilde/src/gcc-12.1.0-default-optimization-no-bootstrap-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include
-I/home/wilde/src/gcc-12.1.0/libstdc++-v3/libsupc++  -O2 -g
/home/wilde/src/gcc-12.1.0/libstdc++-v3/include/precompiled/extc++.h -o
i386-unknown-netbsdelf9.2/bits/extc++.h.gch/O2g.gch                             
# No error this time
-------------------------------------------------------------------------

There are even variations in the error like:

8< ----------------------------------------------------------------------
In file included from
/home/wilde/src/gcc-12.1.0/libstdc++-v3/include/precompiled/extc++.h:82:
/home/wilde/src/gcc-12.1.0-build/i386-unknown-netbsdelf9.2/libstdc++-v3/include/ext/enc_filebuf.h:63:1:
internal compiler error: Segmentation fault
   63 | } // namespace
      | ^
0x8f0b06d crash_signal
        ../../gcc-12.1.0/gcc/toplev.cc:322
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://github.com/jashandeep-sohi/libgccjit-pkg/issues> for instructions.
------------------------------------------------------------------------

After doing this exercise for the two header files the compilation can
be restarted using gmake and finishes as expected...

The problem only ever arises with this two files, but for those I
experienced it every time I build gcc 12.1 on NetBSD 9.2.

I'm fully aware, that this looks like an hardware problem, but it
really happens independently of the hardware used.

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

end of thread, other threads:[~2022-05-11 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 10:47 [Bug bootstrap/105561] New: Nondeterministic ICE on creation of bits/stdc++.h.gch/O2g.gch and bits/extc++.h.gch/O2g.gch swilde@sha-bang.de
2022-05-11 11:05 ` [Bug bootstrap/105561] " rguenth at gcc dot gnu.org
2022-05-11 12:38 ` swilde@sha-bang.de
2022-05-11 13:02 ` swilde@sha-bang.de

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).