Closed
Bug 722575
Opened 12 years ago
Closed 12 years ago
SerialRecordConsumer.java consumerIsDone() is not threadsafe
Categories
(Firefox for Android Graveyard :: Android Sync, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla13
People
(Reporter: dchanm+bugzilla, Assigned: nalexander)
References
Details
(Whiteboard: [qa-])
consumerIsDone() reads the counter variable in a non-threadsafe manner. This isn't a huge deal since the value is only used for logging purposes. Threads (T1, T2) T1 calls run() T1 obtains lock for monitor T1 calls consumerIsDone() T1 executes info() and checks for value of counter (let's say 0) T1 is context switched out before ?: executes T2 calls storeSerially() T2 obtains lock for storeSerializer T2 increments counter T2 is context switched out T1 finishes info call and logs "Consumer is done. Processed 0 records." since counter == 1 is now true [1] - https://github.com/mozilla-services/android-sync/blob/develop/src/main/java/org/mozilla/gecko/sync/synchronizer/SerialRecordConsumer.java#L133
Comment 1•12 years ago
|
||
(In reply to David Chan [:dchan] from comment #0) > This isn't a huge deal since the value is only used for logging purposes. Yup, that's why I left it for now :D Thanks for filing, though!
Priority: -- → P3
Assignee | ||
Comment 2•12 years ago
|
||
Merged in develop: https://github.com/mozilla-services/android-sync/commit/fe693ca8755706456fc36084d45ce08e949d2389
Comment 3•12 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/e24e2c2da258
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Whiteboard: [fixed in services][qa-]
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/16bf8c62011d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e24e2c2da258
Whiteboard: [fixed in services][qa-] → [qa-]
Updated•11 years ago
|
Product: Mozilla Services → Android Background Services
Updated•7 years ago
|
Product: Android Background Services → Firefox for Android
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•