[PATCH] D40294: Prevent Thread Exited/Joined events race
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 04:21:30 PST 2017
krytarowski added a comment.
This change proposal is in the same time request for improvement.
check-tsan can give nice looking results like:
Testing Time: 48.84s
********************
Failing Tests (13):
ThreadSanitizer-x86_64 :: deadlock_detector_stress_test.cc
ThreadSanitizer-x86_64 :: dtls.c
ThreadSanitizer-x86_64 :: exceptions.cc
ThreadSanitizer-x86_64 :: ignore_lib5.cc
ThreadSanitizer-x86_64 :: ignored-interceptors-mmap.cc
ThreadSanitizer-x86_64 :: longjmp3.cc
ThreadSanitizer-x86_64 :: longjmp4.cc
ThreadSanitizer-x86_64 :: mutex_lock_destroyed.cc
ThreadSanitizer-x86_64 :: signal_errno.cc
ThreadSanitizer-x86_64 :: signal_malloc.cc
ThreadSanitizer-x86_64 :: signal_sync2.cc
ThreadSanitizer-x86_64 :: signal_thread.cc
ThreadSanitizer-x86_64 :: vfork.cc
Expected Passes : 245
Expected Failures : 1
Unsupported Tests : 83
Unexpected Failures: 13
On the other hand there still can happen this race... so something is suboptimal. Improper usage of atomic functions?
Failing Tests (43):
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/Posix.ThreadLocalAccesses
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.BasicMutex
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.BasicSpinMutex
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.BenignRaceOnVptr
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.FuncCall
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.HarmfulRaceOnVptr
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.LockedWriteThenRead
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.Memcpy
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.MemcpyRace2
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.MemcpyRace3
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.MemcpyStack
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.MemsetRace1
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.Mutex
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.RaceWithOffset
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.RaceWithOffset2
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ReadReadNoRace
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ReadWriteRace
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ReportDeadThread
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ReportRace
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.RwMutex
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.SimpleWrite
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.SimpleWriteWrite
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.StaticMutex
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ThreadDetach1
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.ThreadSync
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.WriteReadRace
ThreadSanitizer-Unit :: rtl/./TsanRtlTest-x86_64-Test/ThreadSanitizer.WriteThenLockedRead
ThreadSanitizer-Unit :: unit/./TsanUnitTest-x86_64-Test/Mutex.Write
ThreadSanitizer-x86_64 :: deadlock_detector_stress_test.cc
ThreadSanitizer-x86_64 :: dtls.c
ThreadSanitizer-x86_64 :: exceptions.cc
ThreadSanitizer-x86_64 :: fd_tid_recycled.cc
ThreadSanitizer-x86_64 :: ignore_lib5.cc
ThreadSanitizer-x86_64 :: ignored-interceptors-mmap.cc
ThreadSanitizer-x86_64 :: longjmp3.cc
ThreadSanitizer-x86_64 :: longjmp4.cc
ThreadSanitizer-x86_64 :: mutex_lock_destroyed.cc
ThreadSanitizer-x86_64 :: signal_errno.cc
ThreadSanitizer-x86_64 :: signal_malloc.cc
ThreadSanitizer-x86_64 :: signal_sync2.cc
ThreadSanitizer-x86_64 :: signal_thread.cc
ThreadSanitizer-x86_64 :: vfork.cc
Expected Passes : 252
Expected Failures : 1
Unsupported Tests : 83
Unexpected Failures: 43
Repository:
rL LLVM
https://reviews.llvm.org/D40294
More information about the llvm-commits
mailing list