Closed Bug 1137002 Opened 9 years ago Closed 9 years ago

Fix data races in ImageLib related to off-main-thread OnDataAvailable

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39

People

(Reporter: seth, Assigned: seth)

References

Details

(Whiteboard: gfx-noted)

We're seeing multiple TSan bugs (which are blocked by this bug) that suggest that we're accessing imgRequest fields from multiple threads in an unsynchronized way. The current bug reports involve mImage and mProgressTracker, but I want to be sure that everything we're doing is safe (especially since we have some crashes in this area of the code that are currently unexplained).

As far as I'm aware, imgRequest::OnDataAvailable is the only method we're calling off-main-thread. (Well, that and the methods that it calls transitively.) So this bug boils down to making sure that all the state that OnDataAvailable touches is threadsafe.

I think there are really a few different sub-issues here, so let's treat this as a metabug.
Depends on: 1137019
Depends on: 1137037
Depends on: 1139225
Depends on: 1139804
Whiteboard: gfx-noted
Depends on: 1141586
Blocks: 1141586
No longer depends on: 1141586
Depends on: 1142849
This should be ready to resolve, but I'd like to wait for verification that ASAN doesn't report any more warnings in this code.
Blocks: 1128305
Blocks: 1129617
Blocks: 1141078
Blocks: 1116325
Depends on: 1148397
OK, I think we're finally ready to resolve this. Nathan, please reopen (or file a new bug) if you hit any further TSan issues in this area of the code.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.