Bug 1144032 - LTO: Segmentation fault when trying to link gmsh
LTO: Segmentation fault when trying to link gmsh
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Martin Liška
E-mail List
:
Depends on:
Blocks: 1133084
  Show dependency treegraph
 
Reported: 2019-08-02 13:07 UTC by Stefan Brüns
Modified: 2020-12-15 10:31 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Brüns 2019-08-02 13:07:57 UTC
https://build.opensuse.org/package/live_build_log/science/gmsh/openSUSE_Tumbleweed/x86_64

---
/home/abuild/rpmbuild/BUILD/gmsh-4.4.1-source/Mesh/meshGFace.cpp: In function 'meshGeneratorPeriodic':
[  331s] /home/abuild/rpmbuild/BUILD/gmsh-4.4.1-source/Mesh/meshGFace.cpp:2076:13: internal compiler error: Segmentation fault
[  331s]  2076 | static bool meshGeneratorPeriodic(GFace *gf, int RECUR_ITER,
[  331s]       |             ^
[  331s] Please submit a full bug report,
[  331s] with preprocessed source if appropriate.
[  331s] See <https://bugs.opensuse.org/> for instructions.
[  331s] make[3]: *** [/tmp/cckDO69I.mk:293: /tmp/libgmsh.so.4.4.1.ERGAVv.ltrans97.ltrans.o] Error 1
[  331s] make[3]: *** Waiting for unfinished jobs....
[  331s] lto-wrapper: fatal error: make returned 2 exit status
[  331s] compilation terminated.
[  331s] /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: error: lto-wrapper failed
[  331s] collect2: error: ld returned 1 exit status
---

meshGeneratorPeriodic is a huge function which calls itself iteratively.
Comment 1 Martin Liška 2019-08-05 08:20:27 UTC
I can see the package is built now successfully. It looks to me that you're running out-of-memory..
Comment 2 Michael Matz 2019-08-05 13:54:24 UTC
I'm not so sure:
out-of-memory is normally only related to a segmentation fault if the stack
overflows, but the latter is unlikely to depend on the build machine used.
(GCC will abort with different messages if heap memory is exhausted)

Also, gmsh seems to use only a bit above 500MB max per cc1plus, which all
workers provide. So this segfault doesn't seem likely to be related to OOM. 
OTOH without a reliable reproducer it's also unlikely we make progress.

So, I'm tempted to close this as WORKSFORME.
Comment 3 Martin Liška 2019-08-05 14:00:23 UTC
Works for me.
Comment 4 Stefan Brüns 2019-08-05 14:49:02 UTC
Linking only succeeds as LTO is disabled for now.
Comment 5 Martin Liška 2019-08-06 07:20:38 UTC
I can confirm it's a real ICE in fre. I've been reducing the test-case.
Comment 6 Martin Liška 2019-08-06 08:20:15 UTC
I've just created upstream bug for that.
Comment 7 Martin Liška 2020-12-15 10:31:09 UTC
Should be fixed now and the package uses -flto now.