Segmentation fault with latest version of trunk

Hi everyone,

I just updated my branches I seem to fail to execute anything involving OpneMP. I’m getting the a seg fault immediately.

Is OpenMP currently broken? Looks like libomptarget might be to blame.

Here is the gdb trace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) up
#1 0x00003fffb7c25814 in RTLsTy::LoadRTLs() () from /localhd/gbercea/patch-compiler/obj-release/lib/libomptarget.so
(gdb)
#2 0x00003fffb7c28624 in void std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void (RTLsTy::)()> (RTLsTy)> >() () from /localhd/gbercea/patch-compiler/obj-release/lib/libomptarget.so
(gdb)
#3 0x00003fffb7efb0e4 in __once_proxy () from /usr/lib/powerpc64le-linux-gnu/libstdc++.so.6
(gdb)
#4 0x00003fffb7bd058c in __GI___pthread_once (once_control=0x3fffb7c40338 , init_routine=0x3fffb7efb0b0 <__once_proxy>) at …/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c:86
86 …/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c: No such file or directory.
(gdb)
#5 0x00003fffb7c25bb4 in RTLsTy::RegisterLib(__tgt_bin_desc*) () from /localhd/gbercea/patch-compiler/obj-release/lib/libomptarget.so
(gdb)
#6 0x00003fffb7c244ec in __tgt_register_lib () from /localhd/gbercea/patch-compiler/obj-release/lib/libomptarget.so
(gdb)
#7 0x0000000010000df8 in .omp_offloading.descriptor_reg.nvptx64-nvidia-cuda ()
(gdb)
#8 0x000000001002a6c4 in __libc_csu_init ()
(gdb)
#9 0x00003fffb7a24c8c in generic_start_main (main=0x100019a0 , argc=, argv=0x3ffffffff138, auxvec=0x3ffffffff2f0, init=0x1002a630 <__libc_csu_init>, rtld_fini=, stack_end=,
fini=) at …/csu/libc-start.c:246
246 …/csu/libc-start.c: No such file or directory.
(gdb)
#10 0x00003fffb7a24ef8 in __libc_start_main (argc=, argv=, ev=, auxvec=, rtld_fini=, stinfo=, stack_on_entry=)
at …/sysdeps/unix/sysv/linux/powerpc/libc-start.c:93
93 …/sysdeps/unix/sysv/linux/powerpc/libc-start.c: No such file or directory.
(gdb)
#11 0x0000000000000000 in ?? ()

Thanks,

–Doru

Working for me right now, even though I haven't updated the compiler today. Can you get line information?

I'm aware of https://reviews.llvm.org/D51653 which changed RTLsTy::LoadRTLs(), but that has only removed an unused vector.
My other cleanups were mostly focused on the NVPTX device runtime...

Jonas

It works for me on Power as well except an intermittent failure in
lock/omp_init_lock.c.

Kelvin