TSan: data race image/src/imgRequest.h:195 GetOwner (really HasTransferredData)

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: froydnj, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tsan][gfx-noted])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8575337 [details]
imagelib-gotdata-race.txt

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

* Specific information about this bug

I was very confused when I opened up imgRequest.h and looked at the line where GetOwner was supposed to be.  I don't know why TSan thinks that imgRequest::HasTransferredData is really named GetOwner, but there you go.

Anyway, looking at the offending write, TSan is complaining that we're poking at imgRequest::mGotData on two different threads without any synchronization.

* 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
No longer blocks: 1137002
Depends on: 1137002

Updated

4 years ago
Whiteboard: [tsan] → [tsan][gfx-noted]
Fixed in bug 1137002.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.