We used to call __kmpc_omp_taskwait function with global threadid set to
0. It may crash the application at the runtime if the thread executing
target region is not a master thread.
Details
Details
- Reviewers
grokos kkwli0 jdoerfert - Commits
- rOMP366220: [OPENMP]Fix threadid in __kmpc_omp_taskwait call for dependent target calls.
rG42816107f78e: [OPENMP]Fix threadid in __kmpc_omp_taskwait call for dependent target calls.
rL366220: [OPENMP]Fix threadid in __kmpc_omp_taskwait call for dependent target calls.
Diff Detail
Diff Detail
- Repository
- rOMP OpenMP
- Build Status
Buildable 34780 Build 34779: arc lint + arc unit
Event Timeline
Comment Actions
The test fails for me with segfault in line 22.
$ gdb target_depend_nowait.cpp.tmp-x86_64-pc-linux-gnu (gdb) run ... Program received signal SIGSEGV, Segmentation fault. (gdb) bt #0 0x0000000000400fcf in .omp_outlined._debug__ (.global_tid.=0x2aaab96b9be0, .bound_tid.=0x2aaab96b9bd8) at target_depend_nowait.cpp:22 #1 0x0000000000401e8d in .omp_outlined..23 (.global_tid.=0x2aaab96b9be0, .bound_tid.=0x2aaab96b9bd8) at target_depend_nowait.cpp:18 #2 0x00002aaaab574213 in __kmp_invoke_microtask () from libomp.so #3 0x00002aaaab51338e in __kmp_invoke_task_func () from libomp.so #4 0x00002aaaab5126bf in __kmp_launch_thread () from libomp.so #5 0x00002aaaab55d3d0 in __kmp_launch_worker(void*) () from libomp.so #6 0x00002aaaabbd6e65 in start_thread () from libpthread.so.0 #7 0x00002aaaabee988d in clone () from libc.so.6
Comment Actions
Yes, I can confirm that this test is failing after D68100 (declare mapper runtime implementation) for me as well.
Comment Actions
I'm having a look. The problem actually occurs after D67833 (the clang patch), not D68100. If you see at the backtrace in gdb, control never reaches a libomptarget entry point, things fail once we enter the outlined function for the parallel region via __kmp_invoke_microtask. I doubt it's a libomptarget issue.
Comment Actions
Sorry, I was looking at the date and thought the commit was 2 days old instead of 1 year :)
You are right, the test started to fail after the D67833 commit.