Open vitalybuka opened 4 years ago
Bugzilla Link | 45397 |
Version | unspecified |
OS | Linux |
CC | @jdoerfert,@jprotze |
I replaced the runline for this test with:
// RUN: %libomp-compile && gdb -batch -ex run -ex bt -ex "print __kmp_gtid" -ex "print b" -ex "print (bfhead_t )b" %libomp-run > %t.out 2>&1
The segfault only occurs when the system is loaded, so seems to be sensitive to the scheduling of threads. I can reproduce the segfault by running multiple tests concurrently.
When the test fails, I get output like this:
[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [New Thread 0x2aaaad8b0700 (LWP 135331)] [Thread 0x2aaaad8b0700 (LWP 135331) exited] [New Thread 0x2aaaad8b0700 (LWP 135348)]
Thread 1 "bug_nested_prox" received signal SIGSEGV, Segmentation fault. 0x00002aaaab1fa461 in __kmp_free_fast_memory (th=0x617bc0) at llvm-project/openmp/runtime/src/kmp_alloc.cpp:2203 2203 if ((kmp_uintptr_t)b->bh.bb.bthr & 1) { // the buffer is allocated address
$1 = 0 $2 = (bfhead_t *) 0x78000000000071a3 Cannot access memory at address 0x78000000000071a3
I tried to disable the hidden helper threads in lit config but still get the segfault:
config.environment['LIBOMP_USE_HIDDEN_HELPER_TASK'] = "0" config.environment['LIBOMP_NUM_HIDDEN_HELPER_THREADS'] = "0"
Exit Code: -11
$ ":" "RUN: at line 1" $ "/b/1/openmp-clang-x86_64-linux-debian/llvm.build/./bin/clang" "-fopenmp" "-pthread" "-fno-experimental-isel" "-I" "/b/1/openmp-clang-x86_64-linux-debian/llvm.src/openmp/runtime/test" "-I" "/b/1/openmp-clang-x86_64-linux-debian/llvm.build/projects/openmp/runtime/src" "-L" "/b/1/openmp-clang-x86_64-linux-debian/llvm.build/lib" "-I" "/b/1/openmp-clang-x86_64-linux-debian/llvm.src/openmp/runtime/test/ompt" "/b/1/openmp-clang-x86_64-linux-debian/llvm.src/openmp/runtime/test/tasking/bug_nested_proxy_task.c" "-o" "/b/1/openmp-clang-x86_64-linux-debian/llvm.build/projects/openmp/runtime/test/tasking/Output/bug_nested_proxy_task.c.tmp" "-lm" "-latomic" $ "/b/1/openmp-clang-x86_64-linux-debian/llvm.build/projects/openmp/runtime/test/tasking/Output/bug_nested_proxy_task.c.tmp" note: command had no output on stdout or stderr error: command failed with exit status: -11
--
assigned to @jdoerfert