Closed Bug 1389348 Opened 8 years ago Closed 8 years ago

Data races in DiskImageStore

Categories

(Firefox for iOS :: General, enhancement)

Other
iOS
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 8.2 ---

People

(Reporter: st3fan, Unassigned)

Details

(Whiteboard: [Stability][Crash])

Attachments

(1 file)

There are a number of data races in DiskImageStore around it's keys property. The keys are accessed, and mutated, from multiple threads, possibly causing crashes.
This may be related to https://bugzilla.mozilla.org/show_bug.cgi?id=1386874 which always shows DiskImageStore operations in at least a number of threads when the crash happens.
This patch deals with data races in DiskImageStore. These races are all around the `keys` property, which is not properly shielded for concurrent access. The concurrent access is real, since `DiskImageStore.queue` is a concurrent queue. This patch does two things: * It makes `DiskImageStore.queue` a serial queue. * It makes sure that the full operation is executed on the queue. Previously, `keys` was both read and modified simultaneously. > This patch possibly comes with a performance hit, since we do not process these images concurrently anymore. I realize this is the case, but instead of making this code more complicted, I first want to simply things, per this patch, look at the results, and then optimize of improve.
Attachment #8896073 - Flags: review?(jdarcangelo)
Attachment #8896073 - Flags: review?(jdarcangelo) → review+
Landed on master, uplifted to v8.x
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [Stability][Crash]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: