Bug 2044054 - cantera build fails (segfaults) on Rawhide / ppc64le
Summary: cantera build fails (segfaults) on Rawhide / ppc64le
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker
TreeView+ depends on / blocked
 
Reported: 2022-01-23 13:41 UTC by Mark E. Fuller
Modified: 2022-02-04 14:39 UTC (History)
12 users (show)

Fixed In Version: gcc-12.0.1-0.5.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-04 08:07:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
preprocessed source (708.23 KB, application/gzip)
2022-01-24 14:07 UTC, Dan Horák
no flags Details
preprocessed source as dumped by g++ (709.27 KB, application/gzip)
2022-01-24 14:27 UTC, Dan Horák
no flags Details

Description Mark E. Fuller 2022-01-23 13:41:11 UTC
Excerpt from build log:

g++ -o build/src/base/Solution.os -c -std=c++11 -pthread -O3 -Wno-inline -g -Wall -include src/pch/system.h -fPIC -DNDEBUG -Iinclude -Iinclude/cantera/ext -Ibuild/src -I/usr/include/eigen3 src/base/Solution.cpp
In file included from /usr/include/eigen3/Eigen/Core:210,
                 from /usr/include/eigen3/Eigen/SparseCore:11,
                 from /usr/include/eigen3/Eigen/Sparse:26,
                 from include/cantera/numerics/eigen_sparse.h:10,
                 from include/cantera/kinetics/StoichManager.h:11,
                 from include/cantera/kinetics/Kinetics.h:14,
                 from src/base/Solution.cpp:12:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h:78:8: internal compiler error: Segmentation fault
   78 | static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}
      |        ^
Please submit a full bug report,
with preprocessed source if appropriate.

see https://download.copr.fedorainfracloud.org/results/fuller/Cantera/fedora-rawhide-ppc64le/03192999-cantera/builder-live.log.gz

N.B. this is a preliminary report; package is approved, but not yet built on koji (other than scratch)

Comment 1 Dan Horák 2022-01-24 12:37:53 UTC
The most common ICE with a segfault in rawhide/gcc12 is bug 2043517, but this looks different ... I will try to get the preprocessed source from the buildroot and then we can switch this bug to "gcc".

Comment 2 Dan Horák 2022-01-24 14:01:38 UTC
I have captured the g++ backtrace, see below. But I can reproduce the segfault only when compiling the original source file, can't reproduce it with the preprocessed file.

<mock-chroot> sh-5.1# gdb --quiet --args g++ -o build/src/base/Solution.os -c -std=c++11 -pthread -O3 -Wno-inline -g -Wall -include src/pch/system.h -fPIC -DNDEBUG -Iinclude -Iinclude/cantera/ext -Ibuild/src -I/usr/include/eigen3 src/base/Solution.cpp
Reading symbols from g++...

This GDB supports auto-downloading debuginfo from the following URLs:
https://debuginfod.fedoraproject.org/ 
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Reading symbols from .gnu_debugdata for /usr/bin/g++...
(No debugging symbols found in .gnu_debugdata for /usr/bin/g++)
Missing separate debuginfos, use: dnf debuginfo-install gcc-c++-12.0.1-0.2.fc36.ppc64le
(gdb)  set follow-fork-mode child
(gdb) break internal_error
Breakpoint 1 at 0x1001a418
(gdb) run
Starting program: /usr/bin/g++ -o build/src/base/Solution.os -c -std=c++11 -pthread -O3 -Wno-inline -g -Wall -include src/pch/system.h -fPIC -DNDEBUG -Iinclude -Iinclude/cantera/ext -Ibuild/src -I/usr/include/eigen3 src/base/Solution.cpp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Attaching after Thread 0x7ffff7ff3540 (LWP 322) vfork to child process 325]
[New inferior 2 (process 325)]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching vfork parent process 322 after child exec]
[Inferior 1 (process 322) detached]
process 325 is executing new program: /usr/libexec/gcc/ppc64le-redhat-linux/12/cc1plus
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Thread 2.1 "cc1plus" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7ff5380 (LWP 325)]
0x00000000101b469c in rs6000_builtin_type_compatible(tree_node*, tree_node*) [clone .lto_priv.0] ()
Missing separate debuginfos, use: dnf debuginfo-install gcc-c++-12.0.1-0.2.fc36.ppc64le
(gdb) bt
#0  0x00000000101b469c in rs6000_builtin_type_compatible(tree_node*, tree_node*) [clone .lto_priv.0] ()
#1  0x00000000101b4494 in altivec_resolve_overloaded_builtin(unsigned int, tree_node*, void*) ()
#2  0x00000000112bc99c in resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*, va_gc, vl_embed>*) ()
#3  0x0000000010a8f0c0 in finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ()
#4  0x00000000109c8330 in cp_parser_postfix_expression(cp_parser*, bool, bool, bool, bool, cp_id_kind*) [clone .lto_priv.0] ()
#5  0x00000000109c4048 in cp_parser_binary_expression(cp_parser*, bool, bool, bool, cp_parser_prec, cp_id_kind*) [clone .lto_priv.0] ()
#6  0x00000000109c267c in cp_parser_assignment_expression(cp_parser*, cp_id_kind*, bool, bool) [clone .lto_priv.0] ()
#7  0x00000000109c1bb0 in cp_parser_constant_expression(cp_parser*, int, bool*, bool) [clone .lto_priv.0] ()
#8  0x00000000109be328 in cp_parser_initializer(cp_parser*, bool*, bool*, bool) [clone .lto_priv.0] ()
#9  0x000000001092239c in cp_parser_init_declarator(cp_parser*, int, cp_decl_specifier_seq*, vec<deferred_access_check, va_gc, vl_embed>*, bool, bool, int, bool*, tree_node**, unsigned int*, tree_node**) [clone .lto_priv.0] ()
#10 0x0000000010910ce4 in cp_parser_simple_declaration(cp_parser*, bool, tree_node**) [clone .lto_priv.0] ()
#11 0x000000001090bd30 in cp_parser_declaration(cp_parser*, tree_node*) [clone .lto_priv.0] ()
#12 0x000000001096574c in cp_parser_declaration_seq_opt(cp_parser*) [clone .lto_priv.0] ()
#13 0x00000000112d9f40 in cp_parser_namespace_definition(cp_parser*) [clone .lto_priv.0] ()
#14 0x000000001090bdec in cp_parser_declaration(cp_parser*, tree_node*) [clone .lto_priv.0] ()
#15 0x000000001096574c in cp_parser_declaration_seq_opt(cp_parser*) [clone .lto_priv.0] ()
#16 0x00000000112d9f40 in cp_parser_namespace_definition(cp_parser*) [clone .lto_priv.0] ()
#17 0x000000001090bdec in cp_parser_declaration(cp_parser*, tree_node*) [clone .lto_priv.0] ()
#18 0x00000000112b5b5c in c_parse_file() ()
#19 0x000000001127892c in c_common_parse_file() ()
#20 0x0000000011234e10 in compile_file() [clone .lto_priv.0] ()
#21 0x00000000111c3f8c in toplev::main(int, char**) ()
#22 0x00000000111c3030 in main ()

Comment 3 Dan Horák 2022-01-24 14:07:30 UTC
Created attachment 1853088 [details]
preprocessed source

Comment 4 Dan Horák 2022-01-24 14:27:06 UTC
Created attachment 1853095 [details]
preprocessed source as dumped by g++

Comment 5 Mark E. Fuller 2022-01-27 12:43:14 UTC
Problem persists with gcc-12.0.1-0.2.fc36.ppc64le:
https://download.copr.fedorainfracloud.org/results/fuller/cantera-test/fedora-rawhide-ppc64le/03256015-cantera/

Comment 6 Jakub Jelinek 2022-01-27 12:53:03 UTC
-0.2.fc36 is too old, the question if it works with -0.3.fc36.

Comment 7 Mark E. Fuller 2022-01-28 14:18:31 UTC
Problem persists with gcc-12.0.1-0.3.fc36.ppc64le:

https://download.copr.fedorainfracloud.org/results/fuller/cantera-test/fedora-rawhide-ppc64le/03258312-cantera/builder-live.log.gz:

/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h:78:8: internal compiler error: Segmentation fault
   78 | static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}
      |        ^

Comment 8 Jakub Jelinek 2022-02-01 13:42:23 UTC
Is PCH used?  Might very well be https://gcc.gnu.org/PR104323

Comment 9 Dan Horák 2022-02-01 13:50:43 UTC
it does use PCH

g++ -o build/src/base/Interface.os -c -std=c++11 -pthread -O3 -Wno-inline -g -Wall -include src/pch/system.h -fPIC -DNDEBUG -Iinclude -Iinclude/cantera/ext -Ibuild/src -I/usr/include/eigen3 src/base/Interface.cpp
In file included from /usr/include/eigen3/Eigen/Core:210,
                 from /usr/include/eigen3/Eigen/SparseCore:11,
                 from /usr/include/eigen3/Eigen/Sparse:26,
                 from include/cantera/numerics/eigen_sparse.h:10,
                 from include/cantera/kinetics/StoichManager.h:11,
                 from include/cantera/kinetics/Kinetics.h:14,
                 from include/cantera/kinetics/InterfaceKinetics.h:12,
                 from include/cantera/base/Interface.h:11,
                 from src/base/Interface.cpp:6:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h:78:8: internal compiler error: Segmentation fault
   78 | static _EIGEN_DECLARE_CONST_FAST_Packet4i(ZERO, 0); //{ 0, 0, 0, 0,}
      |        ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccO4ffh6.out file, please attach this to your bugreport.
scons: *** [build/src/base/Interface.os] Error 1

Comment 10 Jakub Jelinek 2022-02-04 08:07:34 UTC
Should be fixed in gcc-12.0.1-0.5.fc36

Comment 11 Mark E. Fuller 2022-02-04 14:39:31 UTC
Thank you Dan and Jakub


Note You need to log in before you can comment on or make changes to this bug.