public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while
@ 2014-12-18 15:22 bernd.edlinger at hotmail dot de
2014-12-18 15:28 ` [Bug sanitizer/64350] " dvyukov at google dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-18 15:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350
Bug ID: 64350
Summary: TSAN fails after stress-testing for a while
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: bernd.edlinger at hotmail dot de
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
Hello,
I see this fatal error from the thread sanitizer, after a while of
stress-testing.
As far as I can tell the application should not hold 64 locks at that time.
Any ideas what that could be wrong here?
Thanks,
Bernd.
FATAL: ThreadSanitizer CHECK failed:
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_deadlock_detector.h:65
"((n_all_locks_)) <
(((sizeof(all_locks_with_contexts_)/sizeof((all_locks_with_contexts_)[0]))))"
(0x40, 0x40)
#0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
../../../../gcc-5-20141214/libsanitizer/tsan/tsan_rtl_report.cc:42
(libtsan.so.0+0x000000071793)
#1 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
../../../../gcc-5-20141214/libsanitizer/tsan/tsan_rtl_report.cc:42
(libtsan.so.0+0x00000007179b)
#2 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_common.cc:72
(libtsan.so.0+0x0000000761b3)
#3 __sanitizer::DeadlockDetectorTLS<__sanitizer::TwoLevelBitVector<1ul,
__sanitizer::BasicBitVector<unsigned long> > >::addLock(unsigned long, unsigned
long, unsigned int)
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_deadlock_detector.h:65
(libtsan.so.0+0x000000079eed)
#4 __sanitizer::DeadlockDetector<__sanitizer::TwoLevelBitVector<1ul,
__sanitizer::BasicBitVector<unsigned long> >
>::onLockAfter(__sanitizer::DeadlockDetectorTLS<__sanitizer::TwoLevelBitVector<1ul,
__sanitizer::BasicBitVector<unsigned long> > >*, unsigned long, unsigned int)
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_deadlock_detector.h:214
(libtsan.so.0+0x000000079eed)
#5 __sanitizer::DD::MutexAfterLock(__sanitizer::DDCallback*,
__sanitizer::DDMutex*, bool, bool)
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_deadlock_detector1.cc:162
(libtsan.so.0+0x000000079eed)
#6 __tsan::MutexLock(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool) ../../../../gcc-5-20141214/libsanitizer/tsan/tsan_rtl_mutex.cc:177
(libtsan.so.0+0x00000006e1e5)
#7 pthread_mutex_lock
../../../../gcc-5-20141214/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:2993
(libtsan.so.0+0x0000000354c7)
#8 interlockedSet(long*, long)
/home/ed/OPCToolboxV5/Source/Core/TBUtil/Platforms.cpp:55
(CPPTestClient+0x000000ee1f06)
#9 TB5Util::Sync::lock() include/Sync.h:218 (CPPTestClient+0x000000810842)
[...]
#19 pthread_start platforms/linux/opcua_p_thread.c:63
(CPPTestClient+0x000000fb7403)
#20 __tsan_thread_start_func
../../../../gcc-5-20141214/libsanitizer/tsan/tsan_interceptors.cc:885
(libtsan.so.0+0x000000023a69)
#21 start_thread <null> (libpthread.so.0+0x000000007e99)
#22 __clone <null> (libc.so.6+0x0000000f42ec)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/64350] TSAN fails after stress-testing for a while
2014-12-18 15:22 [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while bernd.edlinger at hotmail dot de
@ 2014-12-18 15:28 ` dvyukov at google dot com
2014-12-19 8:32 ` bernd.edlinger at hotmail dot de
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dvyukov at google dot com @ 2014-12-18 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350
Dmitry Vyukov <dvyukov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dvyukov at google dot com
--- Comment #1 from Dmitry Vyukov <dvyukov at google dot com> ---
I've fixed a bunch of bugs in deadlock detector just few hours ago.
Please re-test with these fixes:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector.h?r1=224518&r2=224517&pathrev=224518
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector.h?r1=224519&r2=224518&pathrev=224519
I've also added a random stress test, and I think I saw your crash during
testing. It does not happen for me with the fixes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/64350] TSAN fails after stress-testing for a while
2014-12-18 15:22 [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while bernd.edlinger at hotmail dot de
2014-12-18 15:28 ` [Bug sanitizer/64350] " dvyukov at google dot com
@ 2014-12-19 8:32 ` bernd.edlinger at hotmail dot de
2015-01-14 19:07 ` bernd.edlinger at hotmail dot de
2015-01-14 19:19 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2014-12-19 8:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350
--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Dmitry Vyukov from comment #1)
> I've fixed a bunch of bugs in deadlock detector just few hours ago.
>
> Please re-test with these fixes:
>
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/
> sanitizer_deadlock_detector.h?r1=224518&r2=224517&pathrev=224518
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/
> sanitizer_deadlock_detector.h?r1=224519&r2=224518&pathrev=224519
>
> I've also added a random stress test, and I think I saw your crash during
> testing. It does not happen for me with the fixes.
Yes Dimitry,
your patch fixed it for me too.
Thanks,
Bernd.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/64350] TSAN fails after stress-testing for a while
2014-12-18 15:22 [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while bernd.edlinger at hotmail dot de
2014-12-18 15:28 ` [Bug sanitizer/64350] " dvyukov at google dot com
2014-12-19 8:32 ` bernd.edlinger at hotmail dot de
@ 2015-01-14 19:07 ` bernd.edlinger at hotmail dot de
2015-01-14 19:19 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: bernd.edlinger at hotmail dot de @ 2015-01-14 19:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
fixed by r219545
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug sanitizer/64350] TSAN fails after stress-testing for a while
2014-12-18 15:22 [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while bernd.edlinger at hotmail dot de
` (2 preceding siblings ...)
2015-01-14 19:07 ` bernd.edlinger at hotmail dot de
@ 2015-01-14 19:19 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2015-01-14 19:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64350
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-14 19:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 15:22 [Bug sanitizer/64350] New: TSAN fails after stress-testing for a while bernd.edlinger at hotmail dot de
2014-12-18 15:28 ` [Bug sanitizer/64350] " dvyukov at google dot com
2014-12-19 8:32 ` bernd.edlinger at hotmail dot de
2015-01-14 19:07 ` bernd.edlinger at hotmail dot de
2015-01-14 19:19 ` hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).