Closed Bug 1095305 Opened 10 years ago Closed 10 years ago

At enabling Gecko Profiler (1.14.2) or start up with it on debug build hits MOZ_ASSERT() (Assertion failure: nsContentUtils::IsSystemPrincipal(principal), at js\xpconnect\src\XPCWrappedNativeScope.cpp:133)

Categories

(Core :: XPConnect, defect)

36 Branch
All
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Tracking Status
firefox35 --- unaffected
firefox36 --- fixed

People

(Reporter: masayuki, Assigned: billm)

References

Details

(Keywords: crash, regression, reproducible, Whiteboard: [startupcrash])

Crash Data

I'm not 100% sure the condition of this crash, though. First, I reproduced this crash at start up of debug build. Then, I relaunched it in safe mode and enabled addons one by one. Then, when I enable Gecko Profiler 1.14.2, I hits same MOZ_ASSERT(). This must be a new regression but I'm not sure the date. I see following logs: > Assertion failure: nsContentUtils::IsSystemPrincipal(principal), at a:\mozilla\mc-c\src\js\xpconnect\src\XPCWrappedNativeScope.cpp:133 > #01: mozilla::dom::CreateGlobalOptions<nsGlobalWindow>::PostCreateGlobal (a:\mozilla\mc-c\src\dom\bindings\bindingutils.cpp:2590) > #02: mozilla::dom::CreateGlobal<nsGlobalWindow,&mozilla::dom::WindowBinding::GetProtoObjectHandle> (a:\mozilla\mc-c\fx-dbg\dist\include\mozilla\dom\bindingutils.h:2871) > #03: mozilla::dom::WindowBinding::Wrap (a:\mozilla\mc-c\fx-dbg\dom\bindings\windowbinding.cpp:13328) > #04: CreateNativeGlobalForInner (a:\mozilla\mc-c\src\dom\base\nsglobalwindow.cpp:2288) > #05: nsGlobalWindow::SetNewDocument (a:\mozilla\mc-c\src\dom\base\nsglobalwindow.cpp:2494) > #06: nsDocumentViewer::InitInternal (a:\mozilla\mc-c\src\layout\base\nsdocumentviewer.cpp:892) > #07: nsDocumentViewer::Init (a:\mozilla\mc-c\src\layout\base\nsdocumentviewer.cpp:626) > #08: nsDocShell::SetupNewViewer (a:\mozilla\mc-c\src\docshell\base\nsdocshell.cpp:9020) > #09: nsDocShell::Embed (a:\mozilla\mc-c\src\docshell\base\nsdocshell.cpp:6987) > #10: nsDocShell::CreateContentViewer (a:\mozilla\mc-c\src\docshell\base\nsdocshell.cpp:8820) > #11: nsDSURIContentListener::DoContent (a:\mozilla\mc-c\src\docshell\base\nsdsuricontentlistener.cpp:142) > #12: nsDocumentOpenInfo::TryContentListener (a:\mozilla\mc-c\src\uriloader\base\nsuriloader.cpp:730) > #13: nsDocumentOpenInfo::DispatchContent (a:\mozilla\mc-c\src\uriloader\base\nsuriloader.cpp:401) > #14: nsDocumentOpenInfo::OnStartRequest (a:\mozilla\mc-c\src\uriloader\base\nsuriloader.cpp:262) > #15: nsJARChannel::OnStartRequest (a:\mozilla\mc-c\src\modules\libjar\nsjarchannel.cpp:1135) > #16: nsInputStreamPump::OnStateStart (a:\mozilla\mc-c\src\netwerk\base\src\nsinputstreampump.cpp:532) > #17: nsInputStreamPump::OnInputStreamReady (a:\mozilla\mc-c\src\netwerk\base\src\nsinputstreampump.cpp:449) > #18: nsInputStreamReadyEvent::Run (a:\mozilla\mc-c\src\xpcom\io\nsstreamutils.cpp:90) > #19: nsThread::ProcessNextEvent (a:\mozilla\mc-c\src\xpcom\threads\nsthread.cpp:830) > #20: NS_InvokeByIndex (a:\mozilla\mc-c\src\xpcom\reflect\xptcall\md\win32\xptcinvoke.cpp:71) > #21: CallMethodHelper::Invoke (a:\mozilla\mc-c\src\js\xpconnect\src\xpcwrappednative.cpp:2394) > #22: XPCWrappedNative::CallMethod (a:\mozilla\mc-c\src\js\xpconnect\src\xpcwrappednative.cpp:1713) > #23: XPC_WN_CallMethod (a:\mozilla\mc-c\src\js\xpconnect\src\xpcwrappednativejsops.cpp:1250) > #24: ??? (???:???) > #25: ??? (???:???) > #26: ??? (???:???) > #27: EnterBaseline (a:\mozilla\mc-c\src\js\src\jit\baselinejit.cpp:117) > #28: js::jit::EnterBaselineMethod (a:\mozilla\mc-c\src\js\src\jit\baselinejit.cpp:146) > #29: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:3453) > #30: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #31: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #32: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #33: js::DirectProxyHandler::call (a:\mozilla\mc-c\src\js\src\proxy\directproxyhandler.cpp:85) > #34: js::CrossCompartmentWrapper::call (a:\mozilla\mc-c\src\js\src\proxy\crosscompartmentwrapper.cpp:305) > #35: js::Proxy::call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:437) > #36: js::proxy_Call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:819) > #37: js::CallJSNative (a:\mozilla\mc-c\src\js\src\jscntxtinlines.h:231) > #38: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:475) > #39: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2517) > #40: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #41: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #42: js_fun_apply (a:\mozilla\mc-c\src\js\src\jsfun.cpp:1312) > #43: js::CallJSNative (a:\mozilla\mc-c\src\js\src\jscntxtinlines.h:231) > #44: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:482) > #45: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #46: js::DirectProxyHandler::call (a:\mozilla\mc-c\src\js\src\proxy\directproxyhandler.cpp:85) > #47: js::CrossCompartmentWrapper::call (a:\mozilla\mc-c\src\js\src\proxy\crosscompartmentwrapper.cpp:305) > #48: js::Proxy::call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:437) > #49: js::proxy_Call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:819) > #50: js::CallJSNative (a:\mozilla\mc-c\src\js\src\jscntxtinlines.h:231) > #51: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:475) > #52: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2517) > #53: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #54: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #55: js_fun_apply (a:\mozilla\mc-c\src\js\src\jsfun.cpp:1312) > #56: js::CallJSNative (a:\mozilla\mc-c\src\js\src\jscntxtinlines.h:231) > #57: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:482) > #58: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2517) > #59: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #60: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #61: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #62: js::DirectProxyHandler::call (a:\mozilla\mc-c\src\js\src\proxy\directproxyhandler.cpp:85) > #63: js::CrossCompartmentWrapper::call (a:\mozilla\mc-c\src\js\src\proxy\crosscompartmentwrapper.cpp:305) > #64: js::Proxy::call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:437) > #65: js::proxy_Call (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:819) > #66: js::CallJSNative (a:\mozilla\mc-c\src\js\src\jscntxtinlines.h:231) > #67: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:475) > #68: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2517) > #69: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #70: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #71: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #72: js::InvokeGetterOrSetter (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:611) > #73: js::Shape::set (a:\mozilla\mc-c\src\js\src\vm\shape-inl.h:93) > #74: js::NativeSet<0> (a:\mozilla\mc-c\src\js\src\vm\nativeobject.cpp:1709) > #75: js::baseops::SetPropertyHelper<0> (a:\mozilla\mc-c\src\js\src\vm\nativeobject.cpp:2197) > #76: js::DirectProxyHandler::set (a:\mozilla\mc-c\src\js\src\proxy\directproxyhandler.cpp:245) > #77: js::CrossCompartmentWrapper::set (a:\mozilla\mc-c\src\js\src\proxy\crosscompartmentwrapper.cpp:187) > #78: js::Proxy::set (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:353) > #79: js::proxy_SetGeneric (a:\mozilla\mc-c\src\js\src\proxy\proxy.cpp:678) > #80: JSObject::nonNativeSetProperty (a:\mozilla\mc-c\src\js\src\jsobj.cpp:1851) > #81: JSObject::setGeneric (a:\mozilla\mc-c\src\js\src\vm\nativeobject.h:1417) > #82: SetPropertyOperation (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:332) > #83: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2393) > #84: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #85: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #86: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #87: js::InvokeGetterOrSetter (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:611) > #88: js::Shape::set (a:\mozilla\mc-c\src\js\src\vm\shape-inl.h:93) > #89: js::baseops::SetPropertyHelper<0> (a:\mozilla\mc-c\src\js\src\vm\nativeobject.cpp:2072) > #90: SetPropertyOperation (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:327) > #91: Interpret (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:2393) > #92: js::RunScript (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:432) > #93: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:501) > #94: js::Invoke (a:\mozilla\mc-c\src\js\src\vm\interpreter.cpp:538) > #95: JS::Call (a:\mozilla\mc-c\src\js\src\jsapi.cpp:5008) > #96: mozilla::dom::EventHandlerNonNull::Call (a:\mozilla\mc-c\fx-dbg\dom\bindings\eventhandlerbinding.cpp:259) > #97: mozilla::dom::EventHandlerNonNull::Call<nsISupports *> (a:\mozilla\mc-c\fx-dbg\dist\include\mozilla\dom\eventhandlerbinding.h:350) > #98: mozilla::JSEventHandler::HandleEvent (a:\mozilla\mc-c\src\dom\events\jseventhandler.cpp:215) > #99: mozilla::EventListenerManager::HandleEventSubType (a:\mozilla\mc-c\src\dom\events\eventlistenermanager.cpp:964) > #100: mozilla::EventListenerManager::HandleEventInternal (a:\mozilla\mc-c\src\dom\events\eventlistenermanager.cpp:1080) > #101: mozilla::EventListenerManager::HandleEvent (a:\mozilla\mc-c\fx-dbg\dist\include\mozilla\eventlistenermanager.h:330) > #102: mozilla::EventTargetChainItem::HandleEvent (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:204) > #103: mozilla::EventTargetChainItem::HandleEventTargetChain (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:295) > #104: mozilla::EventDispatcher::Dispatch (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:609) > #105: mozilla::EventDispatcher::DispatchDOMEvent (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:671) > #106: PresShell::HandleDOMEventWithTarget (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:8389) > #107: nsContentUtils::DispatchXULCommand (a:\mozilla\mc-c\src\dom\base\nscontentutils.cpp:5925) > #108: nsButtonBoxFrame::DoMouseClick (a:\mozilla\mc-c\src\layout\xul\nsbuttonboxframe.cpp:153) > #109: nsButtonBoxFrame::MouseClicked (a:\mozilla\mc-c\src\layout\xul\nsbuttonboxframe.h:33) > #110: nsButtonBoxFrame::HandleEvent (a:\mozilla\mc-c\src\layout\xul\nsbuttonboxframe.cpp:116) > #111: nsPresShellEventCB::HandleEvent (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:506) > #112: mozilla::EventTargetChainItem::HandleEventTargetChain (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:340) > #113: mozilla::EventDispatcher::Dispatch (a:\mozilla\mc-c\src\dom\events\eventdispatcher.cpp:609) > #114: PresShell::HandleEventInternal (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:8204) > #115: PresShell::HandleEventWithTarget (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:7937) > #116: mozilla::EventStateManager::CheckForAndDispatchClick (a:\mozilla\mc-c\src\dom\events\eventstatemanager.cpp:4413) > #117: mozilla::EventStateManager::PostHandleEvent (a:\mozilla\mc-c\src\dom\events\eventstatemanager.cpp:2922) > #118: PresShell::HandleEventInternal (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:8216) > #119: PresShell::HandlePositionedEvent (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:7910) > #120: PresShell::HandleEvent (a:\mozilla\mc-c\src\layout\base\nspresshell.cpp:7707) > #121: nsViewManager::DispatchEvent (a:\mozilla\mc-c\src\view\nsviewmanager.cpp:776) > #122: nsView::HandleEvent (a:\mozilla\mc-c\src\view\nsview.cpp:1098) > #123: nsWindow::DispatchEvent (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:3717) > #124: nsWindow::DispatchWindowEvent (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:3755) > #125: nsWindow::DispatchMouseEvent (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:4059) > #126: nsWindow::ProcessMessage (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:5067) > #127: nsWindow::WindowProcInternal (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:4405) > #128: CallWindowProcCrashProtected (a:\mozilla\mc-c\src\xpcom\base\nscrashonexception.cpp:35) > #129: nsWindow::WindowProc (a:\mozilla\mc-c\src\widget\windows\nswindow.cpp:4357) > #130: CallNextHookEx[USER32 +0x7834] > #131: CallNextHookEx[USER32 +0x7a9a] > #132: GetMessageW[USER32 +0x988e] > #133: DispatchMessageW[USER32 +0x98f1] > #134: nsAppShell::ProcessNextNativeEvent (a:\mozilla\mc-c\src\widget\windows\nsappshell.cpp:294) > #135: nsBaseAppShell::DoProcessNextNativeEvent (a:\mozilla\mc-c\src\widget\nsbaseappshell.cpp:145) > #136: nsBaseAppShell::OnProcessNextEvent (a:\mozilla\mc-c\src\widget\nsbaseappshell.cpp:298) > #137: nsThread::ProcessNextEvent (a:\mozilla\mc-c\src\xpcom\threads\nsthread.cpp:805) > #138: NS_ProcessNextEvent (a:\mozilla\mc-c\src\xpcom\glue\nsthreadutils.cpp:265) > #139: mozilla::ipc::MessagePump::Run (a:\mozilla\mc-c\src\ipc\glue\messagepump.cpp:140) > #140: MessageLoop::RunInternal (a:\mozilla\mc-c\src\ipc\chromium\src\base\message_loop.cc:233) > #141: MessageLoop::RunHandler (a:\mozilla\mc-c\src\ipc\chromium\src\base\message_loop.cc:227) > #142: MessageLoop::Run (a:\mozilla\mc-c\src\ipc\chromium\src\base\message_loop.cc:201) > #143: nsBaseAppShell::Run (a:\mozilla\mc-c\src\widget\nsbaseappshell.cpp:166) > #144: nsAppShell::Run (a:\mozilla\mc-c\src\widget\windows\nsappshell.cpp:180) > #145: nsAppStartup::Run (a:\mozilla\mc-c\src\toolkit\components\startup\nsappstartup.cpp:282) > #146: XREMain::XRE_mainRun (a:\mozilla\mc-c\src\toolkit\xre\nsapprunner.cpp:4150) > #147: XREMain::XRE_main (a:\mozilla\mc-c\src\toolkit\xre\nsapprunner.cpp:4226) > #148: XRE_main (a:\mozilla\mc-c\src\toolkit\xre\nsapprunner.cpp:4446) > #149: do_main (a:\mozilla\mc-c\src\browser\app\nsbrowserapp.cpp:287) > #150: NS_internal_main (a:\mozilla\mc-c\src\browser\app\nsbrowserapp.cpp:656) > #151: wmain (a:\mozilla\mc-c\src\toolkit\xre\nswindowswmain.cpp:120) > #152: __tmainCRTStartup (f:\dd\vctools\crt\crtw32\startup\crt0.c:255) > #153: BaseThreadInitThunk[KERNEL32 +0x1919f] > #154: RtlInitializeExceptionChain[ntdll +0x50bbb] > #155: RtlInitializeExceptionChain[ntdll +0x50b91]
I think this is a regression from bug 1092156. Bill, I think we should probably only mark the window as part of the addon if it has the system principal (since that invariant seems useful to preserve).
Flags: needinfo?(wmccloskey)
Blocks: 1092156
Flags: needinfo?(wmccloskey)
Yeah, that makes sense.
My story to reproduce: enable 1password Extension restart firefox ->crash https://crash-stats.mozilla.com/report/index/fae24be4-ddfc-4d86-a5eb-9cd8c2141107 https://crash-stats.mozilla.com/report/index/64453057-e338-4f15-abdd-7f2942141107 (and others) Reproducible On Build ID Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:36.0) Gecko/20100101 Firefox/36.0 ID:20141107030202 CSet: 17e190839086
Chris, I take the liberty to remove tracking-e10s as bug 1095455 pointed out this happens with e10s disabled too.
tracking-e10s: ? → ---
Whiteboard: [startupcrash]
Severity: normal → critical
Crash Signature: [@ XPCWrappedNativeScope::XPCWrappedNativeScope(JSContext*, JS::Handle<JSObject*>) ]
OS: Windows 8.1 → Windows 7
Hardware: x86 → All
Please note that I can trigger this crash without restarting by enabling 1Password V4.2.5.b1
Assigning to billm because this crash is related to compartment-per-addon.
Assignee: nobody → wmccloskey
Keywords: reproducible
Fixed by backout.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
1Password and Gecko Profiler work for me on Windows 8.1 BuildID Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:36.0) Gecko/20100101 Firefox/36.0 ID:20141114030206 CSet: 7f0d92595432
You need to log in before you can comment on or make changes to this bug.