[llvm-bugs] [Bug 41584] New: Assertion failure at kmp_runtime.cpp(4277): new_thr->th.th_active == (!0)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 24 10:10:16 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41584

            Bug ID: 41584
           Summary: Assertion failure at kmp_runtime.cpp(4277):
                    new_thr->th.th_active == (!0)
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Runtime Library
          Assignee: unassignedbugs at nondot.org
          Reporter: jdenny.ornl at gmail.com
                CC: llvm-bugs at lists.llvm.org

Using clang and openmp built from r359012, I see the following assertion
failure:

$ cat test.c
int main() {
  #pragma omp target teams num_teams(3)
  ;
  return 0;
}
$ clang -fopenmp test.c
$ ./a.out
Assertion failure at kmp_runtime.cpp(4270): new_thr->th.th_active == (!0).
OMP: Error #13: Assertion failure at kmp_runtime.cpp(4270).
OMP: Hint Please submit a bug report with this message, compile and run
commands used, and machine configuration info including native compiler and
operating system versions. Faster response will be obtained by including all
program sources. For information on submitting this issue, please see
https://bugs.llvm.org/.
Aborted (core dumped)

If I remove num_threads(3), I see the following instead:

$ clang -fopenmp test.c
$ ./a.out
Assertion failure at z_Linux_util.cpp(1469): (__kmp_thread_pool_active_nth) >=
0.
OMP: Error #13: Assertion failure at z_Linux_util.cpp(1469).
OMP: Hint Please submit a bug report with this message, compile and run
commands used, and machine configuration info including native compiler and
operating system versions. Faster response will be obtained by including all
program sources. For information on submitting this issue, please see
https://bugs.llvm.org/.
Aborted (core dumped)

These assertions do not fail every time, so there's a race.  I also see all
this at r357927 but so far never at r357926, so r357927 is the likely culprit.

I built clang and openmp using:

$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ cat /etc/issue
Ubuntu 18.04.2 LTS \n \l

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190424/7627d0c5/attachment.html>


More information about the llvm-bugs mailing list