Closed Bug 1374675 Opened 7 years ago Closed 7 years ago

Crash in mozilla::dom::IDBFactory::CreateForWindow

Categories

(Core :: Storage: IndexedDB, defect)

56 Branch
Unspecified
Windows 10
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 --- unaffected
firefox56 --- fixed

People

(Reporter: marcia, Assigned: bevis)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-255e059d-91c1-467a-b602-2881d0170620.
=============================================================

Seen while looking at crash data - crashes started using 20170620030208: http://bit.ly/2sSfwEu

Possible regression range based on Build ID: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=95543bdc59bd038a3d5d084b85a4fec493c349ee&tochange=7a6baa6cca3292e8099e652b64d27e74df560874

Bug 1352401 touched some code in this area. ni on :bevis
Flags: needinfo?(btseng)
It seems globalWindow->GetScriptableTop() can return nullptr.
In this case, we should re-consider to count individually in IDBFactory::UpdateActiveXxxCount() using TabGroup & mWindow instead of mTopWindow.
I'll backout bug 1352401 first and revise the UpdateActive{Database|Transaction)Count() method again.
Flags: needinfo?(btseng)
IIRC, TabGroup was accessed through mTopWindow in your previous version of the patch, that's why I suggested to update both counters in the window code.
Anyway, mWindow has access to the TabGroup too.
Yes, my concern is that TabGroup is always accessible from mTopWindow so the counter could be updated correctly.
However, for the counter in the TopWindow that is used by TimeoutManager, how could we update the counters correctly if GetScriptableTop() is null? :(
(In reply to Bevis Tseng [:bevis][:btseng] from comment #4)
> Yes, my concern is that TabGroup is always accessible from mTopWindow so the
                                                             ^ Sorry, it's mWindow instead.
> counter could be updated correctly.
> However, for the counter in the TopWindow that is used by TimeoutManager,
> how could we update the counters correctly if GetScriptableTop() is null? :(
But you are right, we should keep the counting be implemented inside nsGlobalWindow but count with mWindow instead of mTopWindow in IDBFactory.
So, can you just call mWindow->UpdateXXX() and let that code decide what to update ?
The method would always update its TabGroup counter and only update its top window counter if the top window exists.
It would be even nicer if we can get rid of mTopWindow in IDBFactory.
(In reply to Jan Varga [:janv] from comment #7)
> So, can you just call mWindow->UpdateXXX() and let that code decide what to
> update ?
> The method would always update its TabGroup counter and only update its top
> window counter if the top window exists.
> It would be even nicer if we can get rid of mTopWindow in IDBFactory.

Yes, that's what I plan to do but maybe update the counter directly to the TimeoutManager of the mWindow. (Because it's still scary to me that we have a valid inner window and its TimeoutManager but we don't provide valid counter information to its TimeoutManager when ScriptableTop is not available which could block the IDB access in other window if timer throttling is enabled.
Ok, sounds good.
Blocks: 1352401
Keywords: regression
It looks like you folks may have a handle on this, but in case it's helpful, there are two users here (poster and a commenter) reporting similar problems as well as a user in the #nightly IRC channel reporting the same.
https://www.reddit.com/r/firefox/comments/6ifrza/nightly_has_stopped_working_every_time_i_close/
They include various bits of information about their systems and the crashes.

The reporter from #nightly induced a crash and provided this crash report: https://crash-stats.mozilla.com/report/index/5255f998-26f5-4b93-990f-6efe80170621
(There are plenty of crash reports, referring to this bug.)
(In reply to Peter Gervai from comment #12)
> (There are plenty of crash reports, referring to this bug.)

Sorry about that.
It has been backed out in mozilla-inbound and shall be backed out from mozilla-central soon.
Seen the backout. No grudge here. Just had to leave nightly until this gets fixed and pushed out since it became absolutely unusable. It's a weird feeling to be on FF-ESR [and having all my addons magically work again]. :-]
Attached file assertion stack
Forgot to mention:

Assertion failure: topOutterWindow, at /home/worker/workspace/build/src/dom/indexedDB/IDBFactory.cpp:168
Will land the patch again by fixing bug 1352401.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee: nobody → btseng
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: