In one of the already existing apps that I'm testing TSan on, I really see a mutex path that is longer than 10 (but not by much, something like 11-13 actually). Let's weaken the assertion and simply not report this deadlock.
Details
- Reviewers
kcc glider dvyukov samsonov - Commits
- rG0287e17d09b9: [tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10
rCRT270319: [tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10
rL270319: [tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10
Diff Detail
Event Timeline
lib/sanitizer_common/sanitizer_deadlock_detector1.cc | ||
---|---|---|
125 | So, can we see it? :) |
lib/sanitizer_common/sanitizer_deadlock_detector1.cc | ||
---|---|---|
125 | It looks to me the report is correct (and it's really a long cycle). In this case it's a collection of Obj-C objects using @synchronized(self) while also referring to other objects. The same issue gets reported multiple times with different cycle lengths, so the report with extremely long cycle isn't really useful (it's already reported with simpler cases). Anyway, increasing the limit works for me as well. |
lib/sanitizer_common/sanitizer_deadlock_detector1.cc | ||
---|---|---|
125 | Let's increase the number to, say, 20 then. |
LGTM with a nit
lib/sanitizer_common/sanitizer_deadlock_detector1.cc | ||
---|---|---|
122 | can you use kMaxLoopSize here? |
can you use kMaxLoopSize here?