Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openmp] runtime/test/affinity/Output/redetect.c test hangs #50745

Open
llvmbot opened this issue Aug 7, 2021 · 2 comments
Open

[openmp] runtime/test/affinity/Output/redetect.c test hangs #50745

llvmbot opened this issue Aug 7, 2021 · 2 comments
Labels
bugzilla Issues migrated from bugzilla openmp

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 7, 2021

Bugzilla Link 51403
Version unspecified
OS Linux
Blocks #51489
Reporter LLVM Bugzilla Contributor
CC @jpeyton52,@tstellar

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

  • thread #​1, name = 'redetect.c.tmp', stop reason = signal SIGSTOP
    frame #​0: 0x00007fd256015d57 libc.so.6__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=, abstime=0x0000000000000000, private=, cancel=) at futex-internal.c:74:11
    thread #​3, name = 'redetect.c.tmp', stop reason = signal SIGSTOP
    frame #​0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017e73ac, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #&#8203;4, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #&#8203;0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017ea168, expected=0, clockid=, abstime=0x0000000000000000, private=, cancel=) 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=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #&#8203;6, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #&#8203;0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017efd6c, expected=0, clockid=, abstime=0x0000000000000000, private=, cancel=) at futex-internal.c:74:11
    thread #​7, name = 'redetect.c.tmp', stop reason = signal SIGSTOP
    frame #​0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017f2b6c, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #&#8203;8, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #&#8203;0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017f5928, expected=0, clockid=, abstime=0x0000000000000000, private=, cancel=) at futex-internal.c:74:11
    thread #​9, name = 'redetect.c.tmp', stop reason = signal SIGSTOP
    frame #​0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017f8728, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #&#8203;10, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #&#8203;0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000017fb528, expected=0, clockid=, abstime=0x0000000000000000, private=, cancel=) 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=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 thread #&#8203;12, name = 'redetect.c.tmp', stop reason = signal SIGSTOP frame #&#8203;0: 0x00007fd25612a6c2 libpthread.so.0__futex_abstimed_wait_common64(futex_word=0x00000000018010e8, expected=0, clockid=, abstime=0x0000000000000000, private=, cancel=) at futex-internal.c:74:11
    Executable module set to "/tmp/portage/sys-libs/libomp-13.0.0.9999/work/libomp-13.0.0.9999_build-abi_x86_64.amd64/runtime/test/affinity/Output/redetect.c.tmp".

(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

  • thread #​1, name = 'redetect.c.tmp', stop reason = signal SIGSTOP
    • frame #​0: 0x00007fd256015d57 libc.so.6__GI___wait4(pid=-1, stat_loc=0x00007ffe95b5fbcc, options=0, usage=0x0000000000000000) at wait4.c:30:10 frame #&#8203;1: 0x0000000000401762 redetect.c.tmpmain + 562
      frame #​2: 0x00007fd255f717fd libc.so.6__libc_start_main(main=(redetect.c.tmpmain), argc=1, argv=0x00007ffe95b600e8, init=, fini=, rtld_fini=, stack_end=0x00007ffe95b600d8) at libc-start.c:332:16
      frame #​3: 0x00000000004011aa redetect.c.tmp`_start + 42

(lldb) thread select 2

  • 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=, abstime=0x0000000000000000, private=, cancel=) at futex-internal.c:74:11
    (lldb) bt
  • 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=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:74:11 frame #&#8203;1: 0x00007fd256123ebf libpthread.so.0__pthread_cond_wait(cond=0x00000000017e4580, mutex=0x00000000017e45c0) at pthread_cond_wait.c:504:10
      frame #​2: 0x00007fd25620790d libomp.sovoid __kmp_suspend_template<kmp_flag_64<false, true> >(th_gtid=9, flag=0x00007fd255ef3e80) at z_Linux_util.cpp:1474:16 frame #&#8203;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.sokmp_flag_64<false, true>::suspend(this=0x00007fd255ef3e80, th_gtid=9) at kmp_wait_release.h:906:31 frame #&#8203;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.sokmp_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 #&#8203;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 #&#8203;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 #&#8203;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
@jpeyton52
Copy link
Contributor

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?

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla openmp
Projects
None yet
Development

No branches or pull requests

3 participants