[llvm-bugs] [Bug 45904] New: Fulfilling event inside task causes deadlock
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 13 07:55:35 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45904
Bug ID: 45904
Summary: Fulfilling event inside task causes deadlock
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: schuchart at hlrs.de
CC: llvm-bugs at lists.llvm.org
Created attachment 23479
--> https://bugs.llvm.org/attachment.cgi?id=23479&action=edit
Minimal example
A task with the detach clause is not completed if the event is fulfilled inside
the task itself before its execution terminates.
Attached is a minimal example (provided by Joachim Protze) to demonstrate this.
The execution deadlocks with the task waiting in the taskwait construct:
#0 0x00007ffff78ccd15 in __kmp_remove_my_task (thread=0x624600, gtid=0,
task_team=0x6278c0, is_constrained=1)
at openmp/runtime/src/kmp_tasking.cpp:2588
#1 0x00007ffff78d3131 in __kmp_execute_tasks_template<kmp_flag_32>
(thread=0x624600, gtid=0, flag=0x7fffffffd260, final_spin=0,
thread_finished=0x7fffffffd28c, itt_sync_obj=0x0,
is_constrained=1) at openmp/runtime/src/kmp_tasking.cpp:2827
#2 0x00007ffff78cd6c3 in __kmp_execute_tasks_32 (thread=0x624600, gtid=0,
flag=0x7fffffffd260, final_spin=0, thread_finished=0x7fffffffd28c,
itt_sync_obj=0x0, is_constrained=1)
at openmp/runtime/src/kmp_tasking.cpp:3002
#3 0x00007ffff78d4772 in kmp_flag_32::execute_tasks (this=0x7fffffffd260,
this_thr=0x624600, gtid=0, final_spin=0, thread_finished=0x7fffffffd28c,
itt_sync_obj=0x0, is_constrained=1)
at openmp/runtime/src/kmp_wait_release.h:753
#4 0x00007ffff78d2ed7 in __kmpc_omp_taskwait_template<false>
(loc_ref=0x7fffffffd328, gtid=0, frame_address=0x0, return_address=0x0)
at openmp/runtime/src/kmp_tasking.cpp:1863
#5 0x00007ffff78cb8e9 in __kmpc_omp_taskwait (loc_ref=0x7fffffffd328, gtid=0)
at openmp/runtime/src/kmp_tasking.cpp:1923
#6 0x00000000004009e9 in .omp_outlined._debug__ (.global_tid.=0x7fffffffd390,
.bound_tid.=0x7fffffffd388) at test_omp_detach_taskwait.c:13
#7 0x0000000000400abd in .omp_outlined..1 (.global_tid.=0x7fffffffd390,
.bound_tid.=0x7fffffffd388) at test_omp_detach_taskwait.c:5
#8 0x00007ffff793c113 in __kmp_invoke_microtask () at
openmp/runtime/src/z_Linux_asm.S:1166
#9 0x00007ffff78a4fb0 in __kmp_fork_call (loc=0x7fffffffd740, gtid=0,
call_context=fork_context_intel, argc=0, microtask=0x400aa0 <.omp_outlined..1>,
invoker=0x7ffff78b13ad <__kmp_invoke_task_func(int)>, ap=0x7fffffffd628) at
openmp/runtime/src/kmp_runtime.cpp:1887
#10 0x00007ffff7892890 in __kmpc_fork_call (loc=0x7fffffffd740, argc=0,
microtask=0x400aa0 <.omp_outlined..1>)
at openmp/runtime/src/kmp_csupport.cpp:308
#11 0x00000000004008cb in main () at test_omp_detach_taskwait.c:5
Clang and libomp were built from git-72edb7986a8059cda12b808aa68828af88a0a1eb
--
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/20200513/32d37915/attachment-0001.html>
More information about the llvm-bugs
mailing list