TSan: data race netwerk/dns/nsDNSService2.cpp:693 SetPrefetchEnabled

RESOLVED FIXED in Firefox 39

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Assigned: bagder)

Tracking

(Blocks: 1 bug)

unspecified
mozilla39
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox39 fixed)

Details

(Whiteboard: [tsan])

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
Created attachment 8575544 [details]
dns-prefetch-race.txt

The attached logfile shows a thread/data race detected by TSan (ThreadSanitizer).

* Specific information about this bug

Not much to say here, looks like a straightforward write-on-one-thread, read-on-another-thread race.  I guess more locking or atomics are the right things to do here?

* 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) [1][2].

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.

[1] http://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong
[2] _How to miscompile programs with "benign" data races_: https://www.usenix.org/legacy/events/hotpar11/tech/final_files/Boehm.pdf
(Assignee)

Comment 1

4 years ago
Created attachment 8575954 [details] [diff] [review]
0001-Bug-1141741-make-mDisablePrefetch-assigns-atomic.patch

I propose simply putting the mDisablePrefetch assignments within the lock already used when it is assigned in other places in this code. See patch.
Comment on attachment 8575954 [details] [diff] [review]
0001-Bug-1141741-make-mDisablePrefetch-assigns-atomic.patch

Review of attachment 8575954 [details] [diff] [review]:
-----------------------------------------------------------------

thanks daniel
Attachment #8575954 - Flags: review+
(Assignee)

Comment 3

4 years ago
The try-run seems fine, if we ignore the Mac OS X builds that seem to have gone completely crazy for no apparent reason caused by this patch:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=8cc11b54d8e0
Keywords: checkin-needed
Keywords: checkin-needed
(Assignee)

Updated

4 years ago
Assignee: nobody → daniel
https://hg.mozilla.org/mozilla-central/rev/2dca9b27c83a
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.