Closed Bug 1174768 Opened 4 years ago Closed 4 years ago

running dom/cache tests in e10s by themselves hits QM shutdown assert

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
e10s + ---
firefox41 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file)

If I run this:

  xvfb-run -a ./mach mochitest dom/cache --e10s

I hit:

[Parent 7714] ###!!! ASSERTION: Calling GetOrCreate() after shutdown!: 'Error', file /srv/mozilla-central/dom/quota/QuotaManager.cpp, line 1320
#01: mozilla::dom::cache::Context::QuotaInitRunnable::Run() (/srv/mozilla-central/dom/cache/Context.cpp:318)
#02: nsThread::ProcessNextEvent(bool, bool*) (/srv/mozilla-central/xpcom/threads/nsThread.cpp:846 (discriminator 1))
#03: NS_ProcessNextEvent(nsIThread*, bool) (/srv/mozilla-central/xpcom/glue/nsThreadUtils.cpp:265)
#04: nsThread::Shutdown() (/srv/mozilla-central/xpcom/threads/nsThread.cpp:645)

This is essentially a race between starting up Cache and shutting down QM.  There is no offline storage yet (because I don't have a QM reference), so I can block QM shutdown or receive notification of shutdown.
Jan, is there any way for me to detect its unsafe to call QuotaManager::GetOrCreate()?  I don't understand why it asserts since nullptr return from GetOrCreate() seems the natural way to detect this condition.
Flags: needinfo?(Jan.Varga)
Sorry, comment 0 should read "I can't block QM shutdown".
GetOrCreate() shouldn't be called after you get Client::ShutdownWorkThreads() or if QuotaManager::IsShuttingDown() returns true.
Flags: needinfo?(Jan.Varga)
Thanks Jan.  This seems to fix it.
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
Attachment #8622595 - Flags: review?(Jan.Varga)
Attachment #8622595 - Flags: review?(Jan.Varga) → review+
https://hg.mozilla.org/mozilla-central/rev/1659c5b4e48d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.