Closed Bug 1279273 Opened 8 years ago Closed 8 years ago

Main thread waiting for session parsing to finish isn't released after parsing has terminated

Categories

(Firefox for Android Graveyard :: General, defect)

49 Branch
All
Android
defect
Not set
normal

Tracking

(firefox47 unaffected, firefox48 unaffected, firefox49 fixed, fennec49+, firefox50 fixed)

RESOLVED FIXED
Firefox 50
Tracking Status
firefox47 --- unaffected
firefox48 --- unaffected
firefox49 --- fixed
fennec 49+ ---
firefox50 --- fixed

People

(Reporter: nalexander, Assigned: JanH)

References

Details

Attachments

(3 files)

I am unable to start Nightly for some time (weeks) and have accepted perhaps half a dozen updates in this time. Starting Nightly shows a white screen with no UI before the system prompts to kill the App. I finally attached my device and grabbed two logcats, which I will attach.
Further investigation reveals this to be a catastrophic failure during session restore. I'm not comfortable posting my sessionstore.js publicly, but I've emailed it to Sebastian and JanH.
tracking-fennec: --- → ?
What happens is that if the main thread arrives here (https://dxr.mozilla.org/mozilla-central/rev/b6f7d0eb61b1878d3d906bd231edf225463ece3f/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java#1539) before the background thread has finished parsing the session data, it will never be released again even though the background thread is calling notifyAll() (https://dxr.mozilla.org/mozilla-central/rev/b6f7d0eb61b1878d3d906bd231edf225463ece3f/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java#1304). The problem is that the session data parsing is running from within a Runnable, so the "this" there is not the same "this" as on the main thread, so notifyAll() naturally won't work.
Assignee: nobody → jh+bugzilla
Blocks: 905223
No longer blocks: 1233799
Summary: Timeout executing service: ServiceRecord{... ... org.mozilla.fennec/org.mozilla.gecko.dlc.DownloadContentService} → Main thread waiting for session parsing to finish isn't released after parsing has terminated
OS: Unspecified → Android
Hardware: Unspecified → All
Version: unspecified → 49 Branch
If the main thread has to wait for the session data parsing to finish - which is more likely when you've got many tabs open, meaning a large sessionstore.js file - it does so on "this", i.e. GeckoApp. The session data parsing itself is done from within a Runnable, so we need to qualify "this" there if we want it to refer to GeckoApp itself, so we can successfully release any waiting threads through notifyAll(). Review commit: https://reviewboard.mozilla.org/r/59094/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/59094/
Attachment #8762403 - Flags: review?(s.kaspari)
Attachment #8762403 - Flags: review?(s.kaspari) → review+
Comment on attachment 8762403 [details] Bug 1279273 - Use correct synchronization object for session data parsing. https://reviewboard.mozilla.org/r/59094/#review56230 Ah, nice!
Comment on attachment 8762403 [details] Bug 1279273 - Use correct synchronization object for session data parsing. Approval Request Comment [Feature/regressing bug #]: Mobile session restoring, bug 905223 [User impact if declined]: Firefox might hang during startup, especially for users with lots of open tabs. [Describe test coverage new/current, TreeHerder]: manual [Risks and why]: Low, this just ensures that waiting and notifying threads are actually using the same synchronization object. [String/UUID change made/needed]: none
Attachment #8762403 - Flags: approval-mozilla-aurora?
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/fx-team/rev/53f5b5c289fb Use correct synchronization object for session data parsing. r=sebastian
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
tracking-fennec: ? → 49+
Comment on attachment 8762403 [details] Bug 1279273 - Use correct synchronization object for session data parsing. Recent regression in session store, we definitely want to fix this on aurora 49.
Attachment #8762403 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: