Open llvmbot opened 3 years ago
mentioned in issue llvm/llvm-project#51489
I'm having trouble reproducing the hang. Is there a particular environment setting (linux kernel, linux distro, glibc version, hardware, etc.) that is critical to replicating the bug?
Extended Description
I can reliably reproduce this when building with GCC 11.2.0 and Clang 13.0.0-rc1, both when building with -O2 and -O0 -g.
This is on Linux 5.13.8, glibc 2.33, openmp release/13.x branch.
If I'm reading the backtraces right, it seems that the first thread is in wait(), while all the remaining threads are waiting on a futex.
Process 3138661 stopped
__GI___wait4(pid=-1, stat_loc=0x00007ffe95b5fbcc, options=0, usage=0x0000000000000000) at wait4.c:30:10 thread #​2, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #​0: 0x00007fd25612a6c2 libpthread.so.0
futex_abstimed_wait_common64(futex_word=0x00000000017e45a8, expected=0, clockid=__futex_abstimed_wait_common64(futex_word=0x00000000017ea168, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #​5, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #​0: 0x00007fd25612a6c2 libpthread.so.0
futex_abstimed_wait_common64(futex_word=0x00000000017ecf6c, expected=0, clockid=__futex_abstimed_wait_common64(futex_word=0x00000000017f2b6c, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #​8, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #​0: 0x00007fd25612a6c2 libpthread.so.0
futex_abstimed_wait_common64(futex_word=0x00000000017f5928, expected=0, clockid=__futex_abstimed_wait_common64(futex_word=0x00000000017fb528, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #​11, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #​0: 0x00007fd25612a6c2 libpthread.so.0
futex_abstimed_wait_common64(futex_word=0x00000000017fe328, expected=0, clockid=(lldb) bt error: libc.so.6 {0x00005c83}: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x42) attribute, but range extraction failed (invalid range list offset 0x42), please file a bug and attach the file at the start of this error message error: libc.so.6 {0x00005e0f}: DIE has DW_AT_ranges(DW_FORM_sec_offset 0x37) attribute, but range extraction failed (invalid range list offset 0x37), please file a bug and attach the file at the start of this error message
__GI___wait4(pid=-1, stat_loc=0x00007ffe95b5fbcc, options=0, usage=0x0000000000000000) at wait4.c:30:10 frame #​1: 0x0000000000401762 redetect.c.tmp
main + 562 frame #2: 0x00007fd255f717fd libc.so.6__libc_start_main(main=(redetect.c.tmp
main), argc=1, argv=0x00007ffe95b600e8, init=(lldb) thread select 2
__futex_abstimed_wait_common64(futex_word=0x00000000017e45a8, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 frame #​1: 0x00007fd256123ebf libpthread.so.0
pthread_cond_wait(cond=0x00000000017e4580, mutex=0x00000000017e45c0) at pthread_cond_wait.c:504:10 frame #2: 0x00007fd25620790d libomp.so`void kmp_suspend_template<kmp_flag_64<false, true> >(th_gtid=9, flag=0x00007fd255ef3e80) at z_Linux_util.cpp:1474:16 frame #3: 0x00007fd25620c5eb libomp.sovoid __kmp_suspend_64<false, true>(th_gtid=9, flag=0x00007fd255ef3e80) at z_Linux_util.cpp:1526:3 frame #​4: 0x00007fd2561c04fb libomp.so
kmp_flag_64<false, true>::suspend(this=0x00007fd255ef3e80, th_gtid=9) at kmp_wait_release.h:906:31 frame #5: 0x00007fd2561bc33a libomp.sobool __kmp_wait_template<kmp_flag_64<false, true>, true, false, true>(this_thr=0x00000000017e4100, flag=0x00007fd255ef3e80, itt_sync_obj=0x0000000000000000) at kmp_wait_release.h:448:13 frame #​6: 0x00007fd2561c037a libomp.so
kmp_flag_64<false, true>::wait(this=0x00007fd255ef3e80, this_thr=0x00000000017e4100, final_spin=1, itt_sync_obj=0x0000000000000000) at kmp_wait_release.h:921:14 frame #7: 0x00007fd2561b8237 libomp.so__kmp_hyper_barrier_release(bt=bs_forkjoin_barrier, this_thr=0x00000000017e4100, gtid=9, tid=-2, propagate_icvs=1, itt_sync_obj=0x0000000000000000) at kmp_barrier.cpp:649:10 frame #​8: 0x00007fd2561bb891 libomp.so
__kmp_fork_barrier(gtid=9, tid=-2) at kmp_barrier.cpp:1938:5 frame #9: 0x00007fd2561836f3 libomp.so::__kmp_launch_thread(this_thr=0x00000000017e4100) at kmp_runtime.cpp:5814:5 frame #​10: 0x00007fd2562053a2 libomp.so
kmp_launch_worker(thr=0x00000000017e4100) at z_Linux_util.cpp:527:14 frame #11: 0x00007fd25611de1e libpthread.so.0start_thread(arg=0x00007fd255ef4ac0) at pthread_create.c:481:8 frame #​12: 0x00007fd25604916f libc.so.6
clone at clone.S:95