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

RESOLVED FIXED in Firefox 43

Status

()

Core
Networking
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: froydnj, Assigned: dragana)

Tracking

(Blocks: 1 bug)

unspecified
mozilla43
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox43 fixed)

Details

(Whiteboard: [tsan])

Attachments

(2 attachments, 1 obsolete attachment)

Created attachment 8660003 [details]
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

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

Comment 3

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c60235ca2af9
(Assignee)

Comment 4

2 years ago
Created attachment 8660758 [details] [diff] [review]
bug_1204043.patch
Attachment #8660758 - Flags: review?(mcmanus)
Attachment #8660758 - Flags: review?(mcmanus) → review+
(Assignee)

Updated

2 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

2 years ago
Created attachment 8661185 [details] [diff] [review]
bug_1204043.patch

rebased
Attachment #8660758 - Attachment is obsolete: true
Flags: needinfo?(dd.mozilla)
Attachment #8661185 - Flags: review+

Comment 7

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/689f55b551e6
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/689f55b551e6
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.