Closed Bug 1051822 Opened 10 years ago Closed 9 years ago

Intermittent "Assertion failure: !mEntered, at ReentrancyGuard.h:39" during browser_notifications.js [@ mozilla::ReentrancyGuard::ReentrancyGuard<mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy, ...]

Categories

(Core :: JavaScript: GC, defect)

x86
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox35 --- fixed
firefox36 --- fixed
firefox37 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: emorley, Assigned: jonco)

References

Details

(Keywords: assertion, intermittent-failure)

Crash Data

Attachments

(1 file)

Windows 7 32-bit mozilla-inbound debug test mochitest-browser-chrome-3 on 2014-08-11 03:02:19 PDT for push ffe2d5537d2d

slave: t-w732-ix-081

https://tbpl.mozilla.org/php/getParsedLog.php?id=45653891&tree=Mozilla-Inbound

{
03:06:13     INFO -  3587 INFO TEST-START | chrome://mochitests/content/browser/toolkit/components/social/test/browser/browser_notifications.js
03:06:13     INFO -  3588 INFO [Child 732] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 310
03:06:13     INFO -  3589 INFO [Parent 3692] WARNING: RemoveObserver() called for unregistered observer: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/hal/Hal.cpp, line 204
03:06:13     INFO -  3590 INFO [Parent 3692] WARNING: RemoveObserver() called for unregistered observer: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/hal/Hal.cpp, line 204
03:06:13     INFO -  3591 INFO [Parent 3692] WARNING: RemoveObserver() called for unregistered observer: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/hal/Hal.cpp, line 204
03:06:13     INFO -  3592 INFO [Parent 3692] WARNING: RemoveObserver() called for unregistered observer: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/hal/Hal.cpp, line 204
03:06:13     INFO -  3593 INFO ###!!! [Parent][OnMaybeDequeueOne] Error: Channel closing: too late to send/recv, messages will be lost
03:06:13     INFO -  3594 INFO [Parent 3692] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 310
03:06:13     INFO -  3595 INFO ###!!! [Child][MessageChannel] Error: Closed channel: cannot send/recv
03:06:13     INFO -  3596 INFO [Child 732] WARNING: content process _exit()ing: file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/dom/ipc/ContentChild.cpp, line 1486
03:06:13     INFO -  3597 INFO nsStringStats
03:06:13     INFO -  3598 INFO  => mAllocCount:          10488
03:06:13     INFO -  3599 INFO  => mReallocCount:          315
03:06:13     INFO -  3600 INFO  => mFreeCount:            5968  --  LEAKED 4520 !!!
03:06:13     INFO -  3601 INFO  => mShareCount:           7659
03:06:13     INFO -  3602 INFO  => mAdoptCount:            429
03:06:13     INFO -  3603 INFO  => mAdoptFreeCount:        428  --  LEAKED 1 !!!
03:06:13     INFO -  3604 INFO  => Process ID: 732, Thread ID: 1268
03:06:13     INFO -  3605 INFO Assertion failure: !mEntered, at c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\obj-firefox\dist\include\mozilla/ReentrancyGuard.h:39
03:06:13     INFO -  3606 INFO ++DOCSHELL 1194CC00 == 11 [pid = 3692] [id = 204]
03:06:13     INFO -  3607 INFO ++DOMWINDOW == 123 (1194E000) [pid = 3692] [serial = 484] [outer = 00000000]
03:06:13     INFO -  3608 INFO ++DOMWINDOW == 124 (11952C00) [pid = 3692] [serial = 485] [outer = 1194E000]
03:06:14     INFO -  3609 INFO [Parent 3692] WARNING: No docshells for remote frames!: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\content\base\src\nsFrameLoader.cpp, line 631
03:06:14     INFO -  3610 INFO [Parent 3692] WARNING: No docshells for remote frames!: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\content\base\src\nsFrameLoader.cpp, line 631
03:06:14     INFO -  3611 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3612 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3613 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3614 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3615 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3616 INFO ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to c:\users\cltbld\appdata\local\temp\tmpo18dw7.mozrunner\runtests_leaks_tab_pid3248.log
03:06:14     INFO -  3617 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3618 INFO [3248] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\xpcom\base\nsTraceRefcnt.cpp, line 148
03:06:14     INFO -  3619 INFO [Child 3248] WARNING: '!compMgr', file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/xpcom/glue/nsComponentManagerUtils.cpp, line 63
03:06:14     INFO -  3620 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(svc) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\ipc\nsIContentChild.cpp, line 31
03:06:14     INFO -  3621 INFO [Child 3248] WARNING: '!compMgr', file c:/builds/moz2_slave/m-in-w32-d-0000000000000000000/build/xpcom/glue/nsComponentManagerUtils.cpp, line 63
03:06:14     INFO -  3622 INFO [Child 3248] WARNING: nsWindow::GetNativeData not implemented for this type: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\widget\xpwidgets\PuppetWidget.cpp, line 781
03:06:14     INFO -  3623 INFO ++DOCSHELL 05DB3000 == 1 [pid = 3248] [id = 1]
03:06:14     INFO -  3624 INFO ++DOMWINDOW == 1 (05DB3800) [pid = 3248] [serial = 1] [outer = 00000000]
03:06:14     INFO -  3625 INFO pldhash: for the aTable at address 05DC4C10, the given aEntrySize of 72 definitely favors chaining over double hashing.
03:06:14     INFO -  3626 INFO ++DOMWINDOW == 2 (09D8E800) [pid = 3248] [serial = 2] [outer = 05DB3800]
03:06:14     INFO -  3627 INFO [Parent 3692] WARNING: Could not get disk information from DiskSpaceWatcher: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\src\storage\DOMStorageIPC.cpp, line 319
03:06:14     INFO -  3628 INFO System JS : WARNING resource://specialpowers/MockFilePicker.jsm:92 - octal literals and octal escape sequences are deprecated
03:06:14     INFO -  3629 INFO System JS : WARNING resource://specialpowers/MockFilePicker.jsm:92 - octal literals and octal escape sequences are deprecated
03:06:14     INFO -  3630 INFO System JS : WARNING resource://specialpowers/MockFilePicker.jsm:92 - octal literals and octal escape sequences are deprecated
03:06:14     INFO -  3631 INFO [Child 3248] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\netwerk\base\src\Predictor.cpp, line 477
03:06:14     INFO -  3632 INFO [Parent 3692] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80070057: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\netwerk\base\src\nsChannelClassifier.cpp, line 67
03:06:14     INFO -  3633 INFO ++DOMWINDOW == 3 (09DEC800) [pid = 3248] [serial = 3] [outer = 05DB3800]
03:06:14     INFO -  3634 INFO [Child 3248] WARNING: Failed to retarget HTML data delivery to the parser thread.: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\parser\html\nsHtml5StreamParser.cpp, line 947
03:06:14     INFO -  3635 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && isAbout) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\quota\QuotaManager.cpp, line 2035
03:06:14     INFO -  3636 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(startupCache) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\xbl\nsXBLDocumentInfo.cpp, line 238
03:06:14     INFO -  3637 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(startupCache) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\xbl\nsXBLDocumentInfo.cpp, line 306
03:06:14     INFO -  3638 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(startupCache) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\xbl\nsXBLDocumentInfo.cpp, line 238
03:06:14     INFO -  3639 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(startupCache) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\dom\xbl\nsXBLDocumentInfo.cpp, line 306
03:06:14     INFO -  3640 INFO [Parent 3692] WARNING: No docshells for remote frames!: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\content\base\src\nsFrameLoader.cpp, line 631
03:06:14     INFO -  3641 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(mDocShell) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\embedding\browser\webBrowser\nsWebBrowser.cpp, line 365
03:06:14     INFO -  3642 INFO [Child 3248] WARNING: NS_ENSURE_TRUE(domWindow) failed: file c:\builds\moz2_slave\m-in-w32-d-0000000000000000000\build\embedding\browser\webBrowser\nsDocShellTreeOwner.cpp, line 86
03:06:14     INFO -  3643 INFO TEST-OK | chrome://mochitests/content/browser/toolkit/components/social/test/browser/browser_notifications.js | took 1290ms

...

03:21:28  WARNING -  PROCESS-CRASH | Main app process exited normally | application crashed [@ mozilla::ReentrancyGuard::ReentrancyGuard<mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> > >(mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> > &,mozilla::detail::GuardObjectNotifier const &)]
03:21:28     INFO -  Crash dump filename: c:\users\cltbld\appdata\local\temp\tmpo18dw7.mozrunner\minidumps\0ddace00-c144-4f49-bda4-d3bb05b2ab2a.dmp
03:21:28     INFO -  Operating system: Windows NT
03:21:28     INFO -                    6.1.7601 Service Pack 1
03:21:28     INFO -  CPU: x86
03:21:28     INFO -       GenuineIntel family 6 model 30 stepping 5
03:21:28     INFO -       8 CPUs
03:21:28     INFO -  Crash reason:  EXCEPTION_BREAKPOINT
03:21:28     INFO -  Crash address: 0x64c3ae20
03:21:28     INFO -  Assertion: Unknown assertion type 0x00000000
03:21:28     INFO -  Thread 0 (crashed)
03:21:28     INFO -   0  mozjs.dll!mozilla::ReentrancyGuard::ReentrancyGuard<mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> > >(mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> > &,mozilla::detail::GuardObjectNotifier const &) [ReentrancyGuard.h:ffe2d5537d2d : 39 + 0x3a]
03:21:28     INFO -      eip = 0x64c3ae20   esp = 0x0031e168   ebp = 0x0031e168   ebx = 0x00458ac4
03:21:28     INFO -      esi = 0x684d1ec6   edi = 0x64f2a3a4   eax = 0x00000000   ecx = 0x684dff12
03:21:28     INFO -      edx = 0x776d70b4   efl = 0x00000202
03:21:28     INFO -      Found by: given as instruction pointer in context
03:21:28     INFO -   1  mozjs.dll!mozilla::VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> >::~VectorBase<js::GCHelperState *,0,js::SystemAllocPolicy,js::Vector<js::GCHelperState *,0,js::SystemAllocPolicy> >() [Vector.h:ffe2d5537d2d : 687 + 0x15]
03:21:28     INFO -      eip = 0x64d6068e   esp = 0x0031e170   ebp = 0x0031e18c
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   2  mozjs.dll!js::GlobalHelperThreadState::~GlobalHelperThreadState() + 0xd
03:21:28     INFO -      eip = 0x64d712ce   esp = 0x0031e194   ebp = 0x0031e1b0
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   3  mozjs.dll!_CRT_INIT [crtdll.c : 413 + 0x2]
03:21:28     INFO -      eip = 0x64e45b2c   esp = 0x0031e19c   ebp = 0x0031e1b0
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   4  mozjs.dll!__DllMainCRTStartup [crtdll.c : 526 + 0x7]
03:21:28     INFO -      eip = 0x64e45c48   esp = 0x0031e1b8   ebp = 0x0031e1f4
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   5  mozjs.dll!_DllMainCRTStartup [crtdll.c : 476 + 0xd]
03:21:28     INFO -      eip = 0x64e45cc5   esp = 0x0031e1fc   ebp = 0x0031e200
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   6  ntdll.dll + 0x589d7
03:21:28     INFO -      eip = 0x776e89d8   esp = 0x0031e208   ebp = 0x0031e220
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -   7  ntdll.dll + 0x5e103
03:21:28     INFO -      eip = 0x776ee104   esp = 0x0031e228   ebp = 0x0031e2c4
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -   8  ntdll.dll + 0x5e19e
03:21:28     INFO -      eip = 0x776ee19f   esp = 0x0031e2cc   ebp = 0x0031e2d8
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -   9  kernel32.dll + 0x52163
03:21:28     INFO -      eip = 0x77832164   esp = 0x0031e2e0   ebp = 0x0031e2ec
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -  10  msvcr100.dll + 0x27ec2
03:21:28     INFO -      eip = 0x684e7ec3   esp = 0x0031e2f4   ebp = 0x0031e2f8
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -  11  msvcr100.dll + 0x27fdf
03:21:28     INFO -      eip = 0x684e7fe0   esp = 0x0031e300   ebp = 0x0031e33c
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -  12  msvcr100.dll + 0x5c0ca
03:21:28     INFO -      eip = 0x6851c0cb   esp = 0x0031e344   ebp = 0x0031e350
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -  13  xul.dll!mozilla::dom::ContentChild::QuickExit() [ContentChild.cpp:ffe2d5537d2d : 1487 + 0x7]
03:21:28     INFO -      eip = 0x65feaf75   esp = 0x0031e358   ebp = 0x0031e360
03:21:28     INFO -      Found by: previous frame's frame pointer
03:21:28     INFO -  14  xul.dll!mozilla::dom::ContentChild::ProcessingError(mozilla::ipc::HasResultCodes::Result) [ContentChild.cpp:ffe2d5537d2d : 1463 + 0x4]
03:21:28     INFO -      eip = 0x65febc2f   esp = 0x0031e360   ebp = 0x0031e360
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  15  xul.dll!mozilla::ipc::MessageChannel::ReportConnectionError(char const *) [MessageChannel.cpp:ffe2d5537d2d : 1546 + 0xc]
03:21:28     INFO -      eip = 0x65290b3e   esp = 0x0031e368   ebp = 0x0031e378
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  16  xul.dll!mozilla::ipc::MessageChannel::Send(IPC::Message *) [MessageChannel.cpp:ffe2d5537d2d : 452 + 0xb]
03:21:28     INFO -      eip = 0x6529aafe   esp = 0x0031e380   ebp = 0x0031e394
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  17  xul.dll!mozilla::dom::PContentChild::SendPJavaScriptConstructor(mozilla::jsipc::PJavaScriptChild *) [PContentChild.cpp:ffe2d5537d2d : 752 + 0xa]
03:21:28     INFO -      eip = 0x653336a6   esp = 0x0031e39c   ebp = 0x0031e3e8
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  18  xul.dll!mozilla::dom::PContentChild::SendPJavaScriptConstructor() [PContentChild.cpp:ffe2d5537d2d : 723 + 0xf]
03:21:28     INFO -      eip = 0x6534454c   esp = 0x0031e3f0   ebp = 0x0031e430
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  19  xul.dll!mozilla::dom::ContentChild::GetCPOWManager() [ContentChild.cpp:ffe2d5537d2d : 1170 + 0x4]
03:21:28     INFO -      eip = 0x65fec7ba   esp = 0x0031e3fc   ebp = 0x0031e430
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  20  xul.dll!ChildProcessMessageManagerCallback::DoSendAsyncMessage(JSContext *,nsAString_internal const &,mozilla::dom::StructuredCloneData const &,JS::Handle<JSObject *>,nsIPrincipal *) [nsFrameMessageManager.cpp:ffe2d5537d2d : 1732 + 0x6]
03:21:28     INFO -      eip = 0x662079cf   esp = 0x0031e404   ebp = 0x0031e430
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  21  xul.dll!nsFrameMessageManager::DispatchAsyncMessageInternal(JSContext *,nsAString_internal const &,mozilla::dom::StructuredCloneData const &,JS::Handle<JSObject *>,nsIPrincipal *) [nsFrameMessageManager.cpp:ffe2d5537d2d : 670 + 0x13]
03:21:28     INFO -      eip = 0x661fc9bf   esp = 0x0031e438   ebp = 0x0031e44c
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  22  xul.dll!nsFrameMessageManager::DispatchAsyncMessage(nsAString_internal const &,JS::Value const &,JS::Value const &,nsIPrincipal *,JSContext *,unsigned char) [nsFrameMessageManager.cpp:ffe2d5537d2d : 701 + 0x23]
03:21:28     INFO -      eip = 0x662095d8   esp = 0x0031e454   ebp = 0x0031e4b0
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  23  xul.dll!nsFrameMessageManager::SendAsyncMessage(nsAString_internal const &,JS::Handle<JS::Value>,JS::Handle<JS::Value>,nsIPrincipal *,JSContext *,unsigned char) [nsFrameMessageManager.cpp:ffe2d5537d2d : 716 + 0x19]
03:21:28     INFO -      eip = 0x66209601   esp = 0x0031e4b8   ebp = 0x0031e4d0
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  24  xul.dll!NS_InvokeByIndex [xptcinvoke.cpp:ffe2d5537d2d : 70 + 0x2]
03:21:28     INFO -      eip = 0x65036f5f   esp = 0x0031e4d8   ebp = 0x0031e50c
03:21:28     INFO -      Found by: call frame info
03:21:28     INFO -  25  xul.dll!CallMethodHelper::Invoke() [XPCWrappedNative.cpp:ffe2d5537d2d : 2369 + 0xe]
03:21:28     INFO -      eip = 0x65557c0c   esp = 0x0031e514   ebp = 0x0031e538
03:21:28     INFO -      Found by: call frame info
}
Tomcat, this is pretty explosive on bughunter. Do you have time to find the regression range and possibly a test case?
This is a pretty low-frequency intermittent dating back to 3 months ago. I would expect bisection to be a pretty big PITA at this point.
Our resident GC gurus might be interested to know about comment 16, though.
Component: JavaScript Engine → JavaScript: GC
(In reply to Bob Clary [:bc:] from comment #16)
> Tomcat, this is pretty explosive on bughunter. Do you have time to find the
> regression range and possibly a test case?

so far i was not running into a testcase of that on bughunter but will see if can catch one during my normal bughunter triage
We've hit this over 5000 times for almost 1000 urls on Windows. It first appeared in bughunter on 11/3 though the windows workers were almost idle waiting for the osx workers to catch up. Regardless, this is pretty recent for us.
Here's a run that should be able to reproduce the crash based on comment 0. We'll see how many retriggers it takes to see how practical bisection will be.
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ed58109d5029
This is happening because ContentChild::QuickExit() is calling exit() regardless of what state the program is in.  Global destructors are called and these trigger this assertion because we are destroying a vector while it is currently being modified.  Basically doing a quick exit like this is not really valid, and I'm sure there are other manifestations of this problem elsewhere in the system.

Some possible solutions, none of which are particularly appealing:
 - don't use global state that will be destructed when we do a quick exit
 - have quick exit set some flag to suppress assertions in destructors
 - implement quick exit in a way that doesn't call destructors
I suppose this isn't really a fix, but going forward we shouldn't be calling this quick exit in debug builds as much any more.  Part of my ongoing work on getting leak checking working on e10s is making it so we don't QuickExit() on shutdown in debug builds, because that prevents us from getting leak logs.
Since I don't suppose quick exit is going to go away, we can just create the helper thread state in such a way that it won't get destructed in the case.  Still kind of unfortunate.

I took the opportunity to remove some calls to ensureInitialized() since this always gets initialized when we create a runtime, and moved the initialization to the runtime since it doesn't just concern the GC.
Assignee: nobody → jcoppeard
Attachment #8535047 - Flags: review?(terrence)
Comment on attachment 8535047 [details] [diff] [review]
bug1051822-helper-state

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

I guess the purpose of this lazy init was for faster startup. We're using enough threads for common tasks now that it's not clear if its worthwhile anymore and the situation certainly isn't going to get better going forward.
Attachment #8535047 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/baca272c339e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Setting ni? for Aurora/Beta approval requests when you feel this has baked long enough :)
Flags: needinfo?(jcoppeard)
Comment on attachment 8535047 [details] [diff] [review]
bug1051822-helper-state

Approval Request Comment
[Feature/regressing bug #]: Bug 
[User impact if declined]: I don't think this actually has any user impact.  It's a debug assertion that fires while we are already exiting, so the impact is the test failures we see.
[Describe test coverage new/current, TBPL]: This has been on central for 7 days.
[Risks and why]: Low
[String/UUID change made/needed]: None
Flags: needinfo?(jcoppeard)
Attachment #8535047 - Flags: approval-mozilla-beta?
Attachment #8535047 - Flags: approval-mozilla-aurora?
Comment on attachment 8535047 [details] [diff] [review]
bug1051822-helper-state

will take uplift to help with the intermittent failures.
Attachment #8535047 - Flags: approval-mozilla-beta?
Attachment #8535047 - Flags: approval-mozilla-beta+
Attachment #8535047 - Flags: approval-mozilla-aurora?
Attachment #8535047 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.