[Bug 1155108] New: Tumbleweed OpenMP Programs Compiled With clang9 and libomp9-devel Receive SEGV During Exit Processing
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 Bug ID: 1155108 Summary: Tumbleweed OpenMP Programs Compiled With clang9 and libomp9-devel Receive SEGV During Exit Processing Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development Assignee: bnc-team-screening@forge.provo.novell.com Reporter: ron163264@gmail.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 822517 --> http://bugzilla.opensuse.org/attachment.cgi?id=822517&action=edit Sample OpenMP program downloaded from LLNL I have replaced the default clang (which deps on clang8) and the associated LLVM components with clang9, lld9, libomp9-devel, etc. The new clang/clang++ work fine on all my test programs except those using OpenMP (option -fopenmp), which all receive a SIGSEGV at the end. By compiling with -g and running under lldb(1), I can see that they complete their normal processing, then receive the SEGV during exit processing, down in library code. My currently installed versions: Tumbleweed snapshot 20191022 clang9-9.0.0-2.2.x86_64 libLLVM9-9.0.0-2.2.x86_64 libLTO9-9.0.0-2.2.x86_64 libomp9-devel-9.0.0-2.2.x86_64 lld9-9.0.0-2.2.x86_64 lldb9-9.0.0-2.2.x86_64 I've attached a simple OpenMP hello-world program I downloaded from LLNL. Build with: $ clang-9 -g -fopenmp -o omp_hello.o omp_hello.c $ clang-9 omp_hello.o -fopenmp -fuse-ld=lld -o omp_hello Then run ./omp_hello alone or under lldb: $ OMP_NUM_THREADS=2 ./omp_hello Hello World from thread = 0 Number of threads = 2 Hello World from thread = 1 Segmentation fault (core dumped) It does not matter whether I use lld or the GNU linker. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c1 --- Comment #1 from Ron Lovell <ron163264@gmail.com> --- The updates to 9.0.3-2.3 in snapshot 20191023 did not change the situation. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c2 --- Comment #2 from Ron Lovell <ron163264@gmail.com> --- (In reply to Ron Lovell from comment #1)
The updates to 9.0.3-2.3 in snapshot 20191023 did not change the situation.
Sorry, that should have been 9.0.0-2.3. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c3 --- Comment #3 from Ron Lovell <ron163264@gmail.com> --- Sorry, that compile line should have a -c option: $ clang-9 -g -fopenmp -o hello_c.o -c hello_c.c -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c4 --- Comment #4 from Ron Lovell <ron163264@gmail.com> --- (In reply to Ron Lovell from comment #3)
Sorry, that compile line should have a -c option:
$ clang-9 -g -fopenmp -o hello_c.o -c hello_c.c
One more time: $ clang-9 -g -fopenmp -o omp_hello.o -c omp_hello.c -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c6 --- Comment #6 from Ron Lovell <ron163264@gmail.com> --- (In reply to Aaron Puchert from comment #5)
This seems pretty strange.
Indeed. Thank you for confirming the issue and drilling down on it. As sanity checks, the OpenMP apps ran okay on my Tumbleweed guest when using Clang 8. They run okay on my Arch Linux guest using Clang 9 and glibc 2.30 (a build from 21 Oct). I just upgraded my Debian Unstable guest to Clang 9 and found they run okay there as well. Debian still has glibc 2.29. I notice that Arch and Debian both have binutils 2.33, whereas Tumbleweed is still using 2.32. It's not obvious how that might be relevant, since I can reproduce the failures after linking with either lld or GNU ld. My understanding is that a transition to Clang 9 as default is coming up. That could create problems for OpenMP programs. We might need to bump up the priority on this one. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c10 Aaron Puchert <aaronpuchert@alice-dsl.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED CC| |matz@suse.com See Also| |https://bugs.llvm.org/show_ | |bug.cgi?id=43927, | |https://sourceware.org/bugz | |illa/show_bug.cgi?id=25176 Resolution|--- |FIXED --- Comment #10 from Aaron Puchert <aaronpuchert@alice-dsl.net> --- Fix has landed in Factory. The bug is reproducible in upstream with (Thin)LTO. However, it's actually a bug in all three linkers. It has been fixed in lld just today [1], and there is a bug report for ld.gold (ld.bfd has the same upstream, so we might end up with a fix for that as well). I'm adding the binutils maintainer to CC so he can follow up with that. It was also suggested that it might be safe to just drop __kmp_internal_end_fini and the -Wl,-fini option. [1] https://reviews.llvm.org/rGf95273f75aaa5db5493aea7902416ce3d5a09043 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c11 --- Comment #11 from Ron Lovell <ron163264@gmail.com> --- The update of LLVM components to 9.0.0-3.1 in TW snapshot 20191109 resolved the issue on my system. Thanks for the quick resolution. Great work, guys! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1155108 http://bugzilla.opensuse.org/show_bug.cgi?id=1155108#c13 --- Comment #13 from OBSbugzilla Bot <bwiedemann+obsbugzillabot@suse.com> --- This is an autogenerated message for OBS integration: This bug (1155108) was mentioned in https://build.opensuse.org/request/show/932377 Backports:SLE-15-SP3 / llvm12 -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com