TSan: data race netwerk/base/nsSocketTransportService2.cpp:880 Run (race on mServeMultipleEventsPerPollIter)

RESOLVED FIXED in Firefox 43

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Assigned: dragana)

Tracking

(Blocks 1 bug)

unspecified
mozilla43
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 fixed)

Details

(Whiteboard: [tsan])

Attachments

(2 attachments, 1 obsolete attachment)

Reporter

Description

4 years ago
Posted file TSan stack trace
The attached logfile shows a thread/data race detected by TSan (ThreadSanitizer).

* Specific information about this bug

Like bug 1204042, this is another race where we're reading something on the socket thread but that is getting written on the main thread.

It looks like this pref was added in bug 1131557; I assume the pref was there in case we needed to quickly back out the new behavior.  But the new behavior has had multiple releases of bake time...can we just remove the pref entirely?

If we can't remove the pref, I guess we could make this an Atomic<> member...

* 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
Flags: needinfo?(mcmanus)
I think this can probably be removed now. to dragana for comment and patch.
Flags: needinfo?(mcmanus) → needinfo?(dd.mozilla)
Assignee

Comment 2

4 years ago
We can remove the pref.
Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(dd.mozilla)
Assignee

Comment 4

4 years ago
Posted patch bug_1204043.patch (obsolete) — Splinter Review
Attachment #8660758 - Flags: review?(mcmanus)
Attachment #8660758 - Flags: review?(mcmanus) → review+
Assignee

Updated

4 years ago
Keywords: checkin-needed
Hi, this failed to apply:

renamed 1204043 -> bug_1204043.patch
applying bug_1204043.patch
patching file netwerk/base/nsSocketTransportService2.h
Hunk #1 FAILED at 230
1 out of 1 hunks FAILED -- saving rejects to file netwerk/base/nsSocketTransportService2.h.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and refresh bug_1204043.patch

maybe this needs a rebase ?
Flags: needinfo?(dd.mozilla)
Assignee

Comment 6

4 years ago
rebased
Attachment #8660758 - Attachment is obsolete: true
Flags: needinfo?(dd.mozilla)
Attachment #8661185 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/689f55b551e6
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.