Closed Bug 1157322 Opened 6 years ago Closed 6 years ago
TSan: data race netwerk/cache2/Cache
IOThread .cpp:315 On Dispatched Event
The attached logfile shows a thread/data race detected by TSan (ThreadSanitizer). * Specific information about this bug This is similar to bug 1122070: we're writing a variable with a monitor held, and reading it without the monitor held. I assume this is done for speed reasons, but TSan finds it sketchy. I guess we could make the mHasXPCOMEvents a relaxed atomic to reassure TSan that things are OK? * General information about TSan, data races, etc. Typically, races reported by TSan are not false positives, but it is possible that the race is benign. Even in this case though, we should try to come up with a fix unless this would cause unacceptable performance issues. Also note that seemingly benign races can possibly be harmful (also depending on the compiler and the architecture) . If the bug cannot be fixed, then this bug should be used to either make a compile-time annotation for blacklisting or add an entry to the runtime blacklist.  http://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong  _How to miscompile programs with "benign" data races_: https://www.usenix.org/legacy/events/hotpar11/tech/final_files/Boehm.pdf
Attachment #8610293 - Flags: review?(honzab.moz) → review+
You need to log in before you can comment on or make changes to this bug.