Closed
Bug 1240227
Opened 10 years ago
Closed 8 years ago
Intermittent test_clearHistory_shutdown.js | application crashed [@ mozalloc_abort(char const * const)] | after Assertion failure: mPendingEventCount (Mismatched calls to observer methods!), at LazyIdleThread.cpp:550
Categories
(Toolkit :: Places, defect, P3)
Toolkit
Places
Tracking
()
RESOLVED
WORKSFORME
| Tracking | Status | |
|---|---|---|
| firefox46 | --- | affected |
People
(Reporter: KWierso, Unassigned)
Details
(Keywords: intermittent-failure)
| Comment hidden (Intermittent Failures Robot) |
This is either a bug in IDB or a bug in LazyIdleThread. ni myself to remember to look at it.
Component: Places → XPCOM
Flags: needinfo?(khuey)
Product: Toolkit → Core
This log is actually really interesting. LazyIdleThread is being shutdown by nsThreadManager::Shutdown because it's still around, but it only accepts events from the thread that created it, which is not the main thread.
Flags: needinfo?(khuey)
I assume this is the QuotaManager's mIOThread. Jan, does QuotaManager block xpcom-shutdown-threads to shutdown that thread? It looks like it does profile-before-change, but maybe that doesn't fire in xpcshell?
Flags: needinfo?(jvarga)
Comment 5•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #4)
> I assume this is the QuotaManager's mIOThread. Jan, does QuotaManager block
> xpcom-shutdown-threads to shutdown that thread? It looks like it does
> profile-before-change, but maybe that doesn't fire in xpcshell?
Yeah, QuotaManager registers as an observer for profile-before-change that should always come before xpcom-shutdown-threads. xpcshell only fires profile-before-change if do_get_profile() was called.
See http://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/head.js
It seems the test here doesn't call do_get_profile().
Flags: needinfo?(jvarga)
Marco, can we change this test to get a profile?
Component: XPCOM → Places
Flags: needinfo?(mak77)
Product: Core → Toolkit
Comment 7•10 years ago
|
||
all the Places xpcshell tests already invoke do_get_profile through http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/tests/head_common.js#74 (http://mxr.mozilla.org/mozilla-central/source/browser/components/places/tests/unit/head_bookmarks.js#18)
Flags: needinfo?(mak77)
Comment 8•10 years ago
|
||
This looks somehow similar to bug 1239794, see https://bugzilla.mozilla.org/show_bug.cgi?id=1239794#c1
Comment 9•10 years ago
|
||
Hm, I remember a problem with an xpcshell test didn't get profile-before-change on time because it registered a cleanup function via do_register_cleanup().
The main xpcshell head.js uses do_register_cleanup() for firing profile-before-change, so profile-before-change may be fired too late.
Comment 10•10 years ago
|
||
what do you mean by too late? functions registered through do_register_cleanup are executed before proceeding with shutdown in a while loop in head.js, so everything should be well alive at that point, we should be well before xpcom-shutdown. Though if the function returns a promise, head.js spins the events loop (http://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/head.js#605) and that is not exactly safe, maybe it is confusing other threads.
Comment 11•10 years ago
|
||
xpcom-shutdown is something else, quota manager shuts down before that when it gets profile-before-change and AFAIK, profile-before-change is fired via a cleanup function for xpcshell tests.
This is the patch where I had to workaround it:
https://hg.mozilla.org/mozilla-central/rev/8ff7083db0ea
The test used a cleanup function to remove data for a domain, but that actually needs quota manager, so it tried to recreate quota manager after profile-before-change was already fired via a cleanup function that was registered sooner than the cleanup function in the test.
Maybe it's unrelated to this bug, though.
Comment 12•10 years ago
|
||
(In reply to Jan Varga [:janv] from comment #11)
> This is the patch where I had to workaround it:
> https://hg.mozilla.org/mozilla-central/rev/8ff7083db0ea
Ah, that's a bug in xpcshell head.js, it should run its cleanup function after all the others, not before them!
I will file a separate bug to fix it, since it may be causing other intermittents. Not sure it's our culprit though, this test runs a cleanup earlier.
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
(In reply to Marco Bonardo [::mak] from comment #12)
> (In reply to Jan Varga [:janv] from comment #11)
> > This is the patch where I had to workaround it:
> > https://hg.mozilla.org/mozilla-central/rev/8ff7083db0ea
>
> Ah, that's a bug in xpcshell head.js, it should run its cleanup function
> after all the others, not before them!
> I will file a separate bug to fix it, since it may be causing other
> intermittents. Not sure it's our culprit though, this test runs a cleanup
> earlier.
Did this get filed? Fixed?
Flags: needinfo?(mak77)
Comment 16•10 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #15)
> > Ah, that's a bug in xpcshell head.js, it should run its cleanup function
> > after all the others, not before them!
> > I will file a separate bug to fix it, since it may be causing other
> > intermittents. Not sure it's our culprit though, this test runs a cleanup
> > earlier.
>
> Did this get filed? Fixed?
Oh sorry, I completely forgot, just filed Bug 1244723, should be easy to fix, but I'm not sure it's going to help this bug.
Flags: needinfo?(mak77)
| Comment hidden (Intermittent Failures Robot) |
| Comment hidden (Intermittent Failures Robot) |
Comment 19•9 years ago
|
||
Bulk assigning P3 to all open intermittent bugs without a priority set in Firefox components per bug 1298978.
Priority: -- → P3
Comment 20•8 years ago
|
||
Bug not seen for >1 year, WFM.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•