theRockLiu / thread-sanitizer

Automatically exported from code.google.com/p/thread-sanitizer
0 stars 0 forks source link

V8 unittest runs into ThreadSanitizer CHECK in tsan_rtl_thread.cc (flaky) #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Unfortunately I wasn't able to reproduce this locally. This flaked two times on 
our bots:
http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/2193/s
teps/Unittests/logs/Thread.SelfJoin
http://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/2189/s
teps/Unittests/logs/Thread.SelfJoin

What is the expected output? What do you see instead?
Don't wanna see internal check failures of the sanitizer.

What version of the product are you using? On what operating system?
Linux precise 64 bits. Clang 223108-14. V8 
4a62f245aed31de0f2a93456294aad36cf7e0baf.

Please provide any additional information below.

Copy of the stack in case the logs vanish:
FATAL: ThreadSanitizer CHECK failed: 
/work/chromium/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc:
307 "((tid)) < ((kMaxTid))" (0xffffffffffffffff, 0x2000)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (unittests+0x0000001f3a02)
    #1 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (unittests+0x0000001f3a0a)
    #2 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) <null> (unittests+0x00000017f0d1)
    #3 __tsan::ThreadJoin(__tsan::ThreadState*, unsigned long, int) <null> (unittests+0x0000001f7017)
    #4 pthread_join <null> (unittests+0x000000197d2a)
    #5 v8::base::Thread::Join() /mnt/data/b/build/slave/v8-linux64-tsan/build/v8/out/../src/base/platform/platform-posix.cc:554:3 (unittests+0x0000005c79e0)
    #6 v8::base::Thread_SelfJoin_Test::TestBody() /mnt/data/b/build/slave/v8-linux64-tsan/build/v8/out/../test/unittests/base/platform/platform-unittest.cc:51:3 (unittests+0x0000002a0dcf)

P.S. I find the path in the stack confusing 
"/work/chromium/src/third_party/llvm". Where is /work/chromium supposed to be? 
On this bot there's no chromium checkout and llvm is located in 
/mnt/data/b/build/slave/v8-linux64-tsan/build/v8/third_party/llvm*

Original issue reported on code.google.com by machenb...@chromium.org on 21 Jan 2015 at 10:50

GoogleCodeExporter commented 9 years ago
The "/work/chromium/src/third_party/llvm" path comes from TSan runtime's debug 
info.
It's somewhere on the machine that was used to build the Clang binaries you're 
using.

Original comment by gli...@google.com on 21 Jan 2015 at 10:53

GoogleCodeExporter commented 9 years ago
This is a bogus test, right? A thread cannot join itself. What is the expected 
outcome of the test? Why do we need such a test?
I would suggest to delete it.

Original comment by dvyu...@google.com on 21 Jan 2015 at 2:21

GoogleCodeExporter commented 9 years ago
There is no simple way to fix it in tsan w/o introducing other issues.
At least disable the test under tsan, as it is not useful under tsan.

Original comment by dvyu...@google.com on 21 Jan 2015 at 2:27