Fennec debug build crashes on app-switch due to hashtable reinitialization

RESOLVED FIXED in Firefox 39

Status

()

Core
Networking: Cache
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

Trunk
mozilla39
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox39 fixed, fennec+)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Created attachment 8574365 [details]
Crash stack

I did a debug build of Fennec using latest m-c code and installed it on a Nexus 4 running Android 4.2.2. Upon startup I hit the crash reported in bug 1140806, so I commented out the assertion referenced there which allowed Fennec to start up. Once Fennec starts up, hit the Android app-switch button, and from the app chooser go back into Fennec. At this point Fennec crashes with the attached stack which seems to point to a hashtable reinitialization in nsCacheService.cpp
tracking-fennec: --- → ?
Created attachment 8575553 [details] [diff] [review]
Patch
Attachment #8575553 - Flags: review?(honzab.moz)
tracking-fennec: ? → +
Comment on attachment 8575553 [details] [diff] [review]
Patch

Honza appears to be away or something.
Attachment #8575553 - Flags: review?(honzab.moz) → review?(mcmanus)
Comment on attachment 8575553 [details] [diff] [review]
Patch

Review of attachment 8575553 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm but I'd feel better if someone working on the cache code reviewed it. michal?
Attachment #8575553 - Flags: review?(mcmanus) → review?(michal.novotny)
Comment on attachment 8575553 [details] [diff] [review]
Patch

Review of attachment 8575553 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/cache/nsCacheService.cpp
@@ +1208,5 @@
>              return;
>  
>          mClearingEntries = true;
>          DoomActiveEntries(nullptr);
> +        mActiveEntries.Shutdown();

AFAICS, some nsDoomEvent can be waiting for a lock on a background thread. nsDoomEvent::Run() calls mActiveEntries.GetEntry() which would assert. mActiveEntries.Shutdown() should be IMO moved after this line http://hg.mozilla.org/mozilla-central/annotate/008b3f65a7e0/netwerk/cache/nsCacheService.cpp#l1234
Attachment #8575553 - Flags: review?(michal.novotny) → review-
Created attachment 8578764 [details] [diff] [review]
Patch

That works too.
Attachment #8575553 - Attachment is obsolete: true
Attachment #8578764 - Flags: review?(michal.novotny)
Attachment #8578764 - Flags: review?(michal.novotny) → review+
Keywords: checkin-needed
Assignee: nobody → bugmail.mozilla
https://hg.mozilla.org/integration/mozilla-inbound/rev/54ab128ef1c0
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/54ab128ef1c0
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.