https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81591
Bug ID: 81591 Summary: segmentation fault when using priorities of nested tasks Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: sistek at seznam dot cz CC: jakub at gcc dot gnu.org Target Milestone: --- Hello, we develop the PLASMA numerical library (https://bitbucket.org/icl/plasma) using OpenMP tasks. We are suffering from a problem with tasks with priorities in the recent GOMP library. In particular, if we prescribe priorities on nested tasks, the code sometimes produces a segfault in the priority_list_downgrade_task function. I attach the output from gdb below. It seems that the priority_queue_lookup_priority function returns NULL on line 941 of task.c Then, in the following call to the priority_list_downgrade_task function on line 942, the empty pointer is accessed, resulting in the exception. Is it a bug in gomp or on our side? Thank you very much for your help. Best wishes, Jakub Sistek Thread 1 "test" received signal SIGSEGV, Segmentation fault. 0x00007ffff393b220 in priority_list_downgrade_task (list=0x0, list=0x0, child_task=0x7fffa4000a70, type=PQ_CHILDREN) at ../../../gcc_svn/libgomp/task.c:876 876 if (list->tasks == node) (gdb) where #0 0x00007ffff393b220 in priority_list_downgrade_task (list=0x0, list=0x0, child_task=0x7fffa4000a70, type=PQ_CHILDREN) at ../../../gcc_svn/libgomp/task.c:876 #1 priority_queue_downgrade_task (task=0x7fffa4000a70, head=0xecfb08, type=PQ_CHILDREN) at ../../../gcc_svn/libgomp/task.c:942 #2 gomp_task_run_pre (team=<optimized out>, parent=0xecfb00, child_task=0x7fffa4000a70) at ../../../gcc_svn/libgomp/task.c:972 #3 GOMP_taskwait () at ../../../gcc_svn/libgomp/task.c:1359 #4 0x00007ffff7a51c99 in plasma_pdamax () from /home/sistek/programming/plasma_jakub_sistek/lib/libplasma.so #5 0x00007ffff7a2d80c in plasma_omp_dsgesv () from /home/sistek/programming/plasma_jakub_sistek/lib/libplasma.so #6 0x00007ffff7a2ede7 in plasma_dsgesv._omp_fn () from /home/sistek/programming/plasma_jakub_sistek/lib/libplasma.so #7 0x00007ffff3937a6f in GOMP_parallel (fn=0x7ffff7a2e4cc <plasma_dsgesv._omp_fn>, data=0x7fffffffca10, num_threads=4, flags=0) at ../../../gcc_svn/libgomp/parallel.c:168 #8 0x00007ffff7a2ca8e in plasma_dsgesv () from /home/sistek/programming/plasma_jakub_sistek/lib/libplasma.so #9 0x00000000005f96f9 in test_dsgesv () #10 0x000000000049ce3b in run_routine () #11 0x000000000049c89b in test_routine () #12 0x000000000049c446 in main () (gdb)