Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Multiple flaky test on openmp-clang-x86_64-linux-debian #44367

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR45397
Status NEW
Importance P enhancement
Reported by Vitaly Buka (vitalybuka@google.com)
Reported on 2020-04-01 21:50:46 -0700
Last modified on 2021-06-08 13:32:57 -0700
Version unspecified
Hardware PC Linux
CC jdoerfert@anl.gov, llvm-bugs@lists.llvm.org, protze@itc.rwth-aachen.de
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Quuxplusone commented 4 years ago
(view as text)
******************** TEST 'libomp :: tasking/bug_nested_proxy_task.c' FAILED
********************
Script:
--
: '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
--
Exit Code: -11

Command Output (stdout):
--
$ ":" "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

--

********************
Quuxplusone commented 4 years ago

Disabled with https://github.com/llvm/llvm-project/commit/c9ae3c5e10796252a7938ac9fa1503481ef2c197

Quuxplusone commented 3 years ago
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
#0  0x00002aaaab1fa461 in __kmp_free_fast_memory (th=0x617bc0) at llvm-
project/openmp/runtime/src/kmp_alloc.cpp:2203
#1  0x00002aaaab230bf0 in __kmp_reap_thread (thread=0x617bc0, is_root=1) at
llvm-project/openmp/runtime/src/kmp_runtime.cpp:5954
#2  0x00002aaaab228a54 in __kmp_reset_root (gtid=0, root=0x607f80) at llvm-
project/openmp/runtime/src/kmp_runtime.cpp:3957
#3  0x00002aaaab2286d8 in __kmp_unregister_root_current_thread (gtid=0) at llvm-
project/openmp/runtime/src/kmp_runtime.cpp:4003
#4  0x00002aaaab22c0f2 in __kmp_internal_end_library (gtid_req=-1) at llvm-
project/openmp/runtime/src/kmp_runtime.cpp:6201
#5  0x00002aaaab22befc in __kmp_internal_end_atexit () at llvm-
project/openmp/runtime/src/kmp_runtime.cpp:5901
#6  0x00002aaaab22bec9 in __kmp_internal_end_dtor () at llvm-
project/openmp/runtime/src/kmp_runtime.cpp:5869
#7  0x00002aaaaaabb08a in _dl_fini () from /lib64/ld-linux-x86-64.so.2
#8  0x00002aaaab76fce9 in __run_exit_handlers () from /lib64/libc.so.6
#9  0x00002aaaab76fd37 in exit () from /lib64/libc.so.6
#10 0x00002aaaab75855c in __libc_start_main () from /lib64/libc.so.6
#11 0x00000000004007d9 in _start ()
$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"