Closed Bug 631394 Opened 13 years ago Closed 13 years ago

Assertion failure: compartment mismatched, at /moz/aboutstartup3/js/src/jscntxtinlines.h:541 with Firebug & Places on the stack

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 628758

People

(Reporter: db48x, Unassigned)

Details

I don't have any way to reproduce this; it's only happened once during startup and I haven't been able to reproduce. This is in a trunk build from this afternoon, with Firebug 1.7X.0a9 installed.

    #0  0x0000003e8beadbbd in nanosleep () from /lib64/libc.so.6
    #1  0x0000003e8beada4f in sleep () from /lib64/libc.so.6
    #2  0x00007f1211445760 in ah_crap_handler (signum=6) at /moz/aboutstartup3/toolkit/xre/nsSigHandlers.cpp:132
    #3  0x00007f121144a017 in nsProfileLock::FatalSignalHandler (signo=6, info=0x7ffff5e48bb0, context=
        0x7ffff5e48a80) at nsProfileLock.cpp:226
    #4  <signal handler called>
    #5  0x0000003e8c60f29b in raise () from /lib64/libpthread.so.0
    #6  0x00007f1212e94358 in JS_Assert (s=0x7f12136f4184 "compartment mismatched", file=
        0x7f12136f3ff8 "/moz/aboutstartup3/js/src/jscntxtinlines.h", ln=541)
        at /moz/aboutstartup3/js/src/jsutil.cpp:83
    #7  0x00007f1212d325d1 in js::CompartmentChecker::fail (c1=0x7f11fbffd000, c2=0x7f120407c000)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:541
    #8  0x00007f1212d326bd in js::CompartmentChecker::check (this=0x7ffff5e48fb0, c=0x7f120407c000)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:557
    #9  0x00007f1212d32772 in js::CompartmentChecker::check (this=0x7ffff5e48fb0, str=0x7f11f8e17f20)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:570
    #10 0x00007f1212d3797b in js::assertSameCompartment<JSString*> (cx=0x7f11f9641800, t1=0x7f11f8e17f20)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:637
    #11 0x00007f1212d2b31f in JS_GetStringCharsZAndLength (cx=0x7f11f9641800, str=0x7f11f8e17f20, plength=
        0x7ffff5e49040) at /moz/aboutstartup3/js/src/jsapi.cpp:5308
    #12 0x00007f121266fc66 in jsdValue::GetStringValue (this=0x7f11f90ef830, _rval=...)
        at /moz/aboutstartup3/js/jsd/jsd_xpc.cpp:2300
    #13 0x00007f1212b3ab76 in NS_InvokeByIndex_P (that=0x7f11f90ef830, methodIndex=20, paramCount=1, params=
        0x7ffff5e49260) at /moz/aboutstartup3/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_unix.cpp:208
    #14 0x00007f1212376bf2 in CallMethodHelper::Invoke (this=0x7ffff5e49220)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappednative.cpp:3099
    #15 0x00007f1212374b9d in CallMethodHelper::Call (this=0x7ffff5e49220)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappednative.cpp:2363
    #16 0x00007f1212370c20 in XPCWrappedNative::CallMethod (ccx=..., mode=XPCWrappedNative::CALL_GETTER)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappednative.cpp:2327
    #17 0x00007f1212381fea in XPCWrappedNative::GetAttribute (ccx=...)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcprivate.h:2651
    #18 0x00007f1212380c68 in XPC_WN_GetterSetter (cx=0x7f120400ac00, argc=0, vp=0x7f1204ffe3b0)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappednativejsops.cpp:1643
    #19 0x00007f1212dcf10c in js::CallJSNative (cx=0x7f120400ac00, native=
        0x7f1212380951 <XPC_WN_GetterSetter(JSContext*, uintN, jsval*)>, argc=0, vp=0x7f1204ffe3b0)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:697
    #20 0x00007f1212dcb2e9 in js::Invoke (cx=0x7f120400ac00, argsRef=..., flags=0)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:704
    #21 0x00007f1212dcbb69 in js::ExternalInvoke (cx=0x7f120400ac00, thisv=..., fval=..., argc=0, argv=0x0, rval=
        0x7ffff5e4a160) at /moz/aboutstartup3/js/src/jsinterp.cpp:862
    #22 0x00007f1212dcbd3d in js::ExternalGetOrSet (cx=0x7f120400ac00, obj=0x7f11f8e209f8, id=..., fval=..., mode=
        JSACC_READ, argc=0, argv=0x0, rval=0x7ffff5e4a160) at /moz/aboutstartup3/js/src/jsinterp.cpp:902
    #23 0x00007f1212df918f in js::Shape::get (this=0x7f11f908b9c8, cx=0x7f120400ac00, receiver=0x7f11f8e209f8, obj=
        0x7f11f8e209f8, pobj=0x7f11f8e209f8, vp=0x7ffff5e4a160) at /moz/aboutstartup3/js/src/jsscopeinlines.h:242
    #24 0x00007f1212df167f in js_NativeGetInline (cx=0x7f120400ac00, receiver=0x7f11f8e209f8, obj=0x7f11f8e209f8,
    ---Type <return> to continue, or q <return> to quit---
        pobj=0x7f11f8e209f8, shape=0x7f11f908b9c8, getHow=1, vp=0x7ffff5e4a160)
        at /moz/aboutstartup3/js/src/jsobj.cpp:5204
    #25 0x00007f1212df1fb3 in js_GetPropertyHelperWithShapeInline (cx=0x7f120400ac00, obj=0x7f11f8e209f8, receiver=
        0x7f11f8e209f8, id=..., getHow=1, vp=0x7ffff5e4a160, shapeOut=0x7ffff5e49a48, holderOut=0x7ffff5e49a40)
        at /moz/aboutstartup3/js/src/jsobj.cpp:5383
    #26 0x00007f1212df208d in js_GetPropertyHelperInline (cx=0x7f120400ac00, obj=0x7f11f8e209f8, receiver=
        0x7f11f8e209f8, id=..., getHow=1, vp=0x7ffff5e4a160) at /moz/aboutstartup3/js/src/jsobj.cpp:5404
    #27 0x00007f1212df20db in js_GetPropertyHelper (cx=0x7f120400ac00, obj=0x7f11f8e209f8, id=..., getHow=1, vp=
        0x7ffff5e4a160) at /moz/aboutstartup3/js/src/jsobj.cpp:5410
    #28 0x00007f121300ec89 in js::Interpret (cx=0x7f120400ac00, entryFrame=0x7f1204ffe330, inlineCallCount=0,
        interpMode=JSINTERP_NORMAL) at /moz/aboutstartup3/js/src/jsinterp.cpp:4202
    #29 0x00007f1212dcb03e in js::RunScript (cx=0x7f120400ac00, script=0x7f120131e000, fp=0x7f1204ffe330)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:661
    #30 0x00007f1212dcb50b in js::Invoke (cx=0x7f120400ac00, argsRef=..., flags=0)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:741
    #31 0x00007f1212da4d63 in js_fun_apply (cx=0x7f120400ac00, argc=2, vp=0x7f1204ffe2e8)
        at /moz/aboutstartup3/js/src/jsfun.cpp:2188
    #32 0x00007f1212dcf10c in js::CallJSNative (cx=0x7f120400ac00, native=
        0x7f1212da4a5b <js_fun_apply(JSContext*, uintN, js::Value*)>, argc=2, vp=0x7f1204ffe2e8)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:697
    #33 0x00007f12130122e6 in js::Interpret (cx=0x7f120400ac00, entryFrame=0x7f1204ffe288, inlineCallCount=0,
        interpMode=JSINTERP_NORMAL) at /moz/aboutstartup3/js/src/jsinterp.cpp:4784
    #34 0x00007f1212dcb03e in js::RunScript (cx=0x7f120400ac00, script=0x7f1200ee8cd0, fp=0x7f1204ffe288)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:661
    #35 0x00007f1212dcb50b in js::Invoke (cx=0x7f120400ac00, argsRef=..., flags=8192)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:741
    #36 0x00007f1212dcbb69 in js::ExternalInvoke (cx=0x7f120400ac00, thisv=..., fval=..., argc=3, argv=
        0x7ffff5e4d0e8, rval=0x7ffff5e4d1f0) at /moz/aboutstartup3/js/src/jsinterp.cpp:862
    #37 0x00007f1212d2a18b in JS_CallFunctionValue (cx=0x7f120400ac00, obj=0x7f11fa2472d8, fval=..., argc=3, argv=
        0x7ffff5e4d0e8, rval=0x7ffff5e4d1f0) at /moz/aboutstartup3/js/src/jsapi.cpp:5053
    #38 0x00007f12123677e5 in nsXPCWrappedJSClass::CallMethod (this=0x7f11fbfe87e0, wrapper=0x7f11f96e5880,
        methodIndex=3, info=0x7f1206f31558, nativeParams=0x7ffff5e4d5b0)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappedjsclass.cpp:1701
    #39 0x00007f121235e0ee in nsXPCWrappedJS::CallMethod (this=0x7f11f96e5880, methodIndex=3, info=0x7f1206f31558,
        params=0x7ffff5e4d5b0) at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappedjs.cpp:588
    #40 0x00007f1212b3b052 in PrepareAndDispatch (self=0x7f11f9649e40, methodIndex=3, args=0x7ffff5e4d750, gpregs=
        0x7ffff5e4d6d0, fpregs=0x7ffff5e4d700)
        at /moz/aboutstartup3/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp:153
    #41 0x00007f1212b3b0e5 in SharedStub ()
        at /moz/aboutstartup3/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp:159
    #42 0x00007f121266adb6 in jsds_ExecutionHookProc (jsdc=0x7f1200876800, jsdthreadstate=0x7f11fbfd6dc0, type=4,
        callerdata=0x0, rval=0x7ffff5e4da20) at /moz/aboutstartup3/js/jsd/jsd_xpc.cpp:692
    #43 0x00007f1212660fd7 in jsd_CallExecutionHook (jsdc=0x7f1200876800, cx=0x7f120400ac00, type=4, hook=
        0x7f121266a952 <jsds_ExecutionHookProc(JSDContext*, JSDThreadState*, uintN, void*, jsval*)>, hookData=0x0,
        rval=0x7ffff5e4da20) at /moz/aboutstartup3/js/jsd/jsd_hook.c:177
    #44 0x00007f1212660f2b in jsd_ThrowHandler (cx=0x7f120400ac00, script=0x7f11fbf3e000, pc=0x7f11fbf3e247 ":",
    ---Type <return> to continue, or q <return> to quit---
        rval=0x7ffff5e4da20, closure=0x7f1200876800) at /moz/aboutstartup3/js/jsd/jsd_hook.c:148
    #45 0x00007f1213021363 in js::Interpret (cx=0x7f120400ac00, entryFrame=0x7f1204ffe158, inlineCallCount=1,
        interpMode=JSINTERP_NORMAL) at /moz/aboutstartup3/js/src/jsinterp.cpp:6802
    #46 0x00007f1212dcb03e in js::RunScript (cx=0x7f120400ac00, script=0x7f11f8c36e60, fp=0x7f1204ffe158)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:661
    #47 0x00007f1212dcb50b in js::Invoke (cx=0x7f120400ac00, argsRef=..., flags=0)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:741
    #48 0x00007f1212da4a1d in js_fun_call (cx=0x7f120400ac00, argc=1, vp=0x7f1204ffe120)
        at /moz/aboutstartup3/js/src/jsfun.cpp:2125
    #49 0x00007f1212dcf10c in js::CallJSNative (cx=0x7f120400ac00, native=
        0x7f1212da47f7 <js_fun_call(JSContext*, uintN, js::Value*)>, argc=2, vp=0x7f1204ffe120)
        at /moz/aboutstartup3/js/src/jscntxtinlines.h:697
    #50 0x00007f12130122e6 in js::Interpret (cx=0x7f120400ac00, entryFrame=0x7f1204ffe050, inlineCallCount=1,
        interpMode=JSINTERP_NORMAL) at /moz/aboutstartup3/js/src/jsinterp.cpp:4784
    #51 0x00007f1212dcb03e in js::RunScript (cx=0x7f120400ac00, script=0x7f1200e54a00, fp=0x7f1204ffe050)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:661
    #52 0x00007f1212dcb50b in js::Invoke (cx=0x7f120400ac00, argsRef=..., flags=0)
        at /moz/aboutstartup3/js/src/jsinterp.cpp:741
    #53 0x00007f1212dcbb69 in js::ExternalInvoke (cx=0x7f120400ac00, thisv=..., fval=..., argc=1, argv=
        0x7ffff5e50f68, rval=0x7ffff5e51070) at /moz/aboutstartup3/js/src/jsinterp.cpp:862
    #54 0x00007f1212d2a18b in JS_CallFunctionValue (cx=0x7f120400ac00, obj=0x7f11fa2de1a0, fval=..., argc=1, argv=
        0x7ffff5e50f68, rval=0x7ffff5e51070) at /moz/aboutstartup3/js/src/jsapi.cpp:5053
    #55 0x00007f12123677e5 in nsXPCWrappedJSClass::CallMethod (this=0x7f11f8f28470, wrapper=0x7f11f9660b00,
        methodIndex=5, info=0x7f1206f29450, nativeParams=0x7ffff5e51430)
        at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappedjsclass.cpp:1701
    #56 0x00007f121235e0ee in nsXPCWrappedJS::CallMethod (this=0x7f11f9660b00, methodIndex=5, info=0x7f1206f29450,
        params=0x7ffff5e51430) at /moz/aboutstartup3/js/src/xpconnect/src/xpcwrappedjs.cpp:588
    #57 0x00007f1212b3b052 in PrepareAndDispatch (self=0x7f11fc3212a0, methodIndex=5, args=0x7ffff5e515d0, gpregs=
        0x7ffff5e51550, fpregs=0x7ffff5e51580)
        at /moz/aboutstartup3/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp:153
    #58 0x00007f1212b3b0e5 in SharedStub ()
        at /moz/aboutstartup3/xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp:159
    #59 0x00007f12126f51dc in mozilla::storage::(anonymous namespace)::CompletionNotifier::Run (this=
        0x7f1203446d00) at /moz/aboutstartup3/storage/src/mozStorageAsyncStatementExecution.cpp:164
    #60 0x00007f1212b1b2ce in nsThread::ProcessNextEvent (this=0x7f1208b53180, mayWait=0, result=0x7ffff5e516ec)
        at /moz/aboutstartup3/xpcom/threads/nsThread.cpp:633
    #61 0x00007f1212aa4bd0 in NS_ProcessNextEvent_P (thread=0x7f1208b53180, mayWait=0) at nsThreadUtils.cpp:250
    #62 0x00007f12128dfbf8 in mozilla::ipc::MessagePump::Run (this=0x7f120f3f22c0, aDelegate=0x7f1208b561c0)
        at /moz/aboutstartup3/ipc/glue/MessagePump.cpp:110
    #63 0x00007f1212b8581f in MessageLoop::RunInternal (this=0x7f1208b561c0)
        at /moz/aboutstartup3/ipc/chromium/src/base/message_loop.cc:219
    #64 0x00007f1212b857a4 in MessageLoop::RunHandler (this=0x7f1208b561c0)
        at /moz/aboutstartup3/ipc/chromium/src/base/message_loop.cc:202
    #65 0x00007f1212b85735 in MessageLoop::Run (this=0x7f1208b561c0)
        at /moz/aboutstartup3/ipc/chromium/src/base/message_loop.cc:176
    #66 0x00007f12128085c5 in nsBaseAppShell::Run (this=0x7f120f3fff20)
    ---Type <return> to continue, or q <return> to quit---
        at /moz/aboutstartup3/widget/src/xpwidgets/nsBaseAppShell.cpp:192
    #67 0x00007f121254780f in nsAppStartup::Run (this=0x7f12040379c0)
        at /moz/aboutstartup3/toolkit/components/startup/src/nsAppStartup.cpp:236
    #68 0x00007f12114370ed in XRE_main (argc=4, argv=0x7ffff5e52318, aAppData=0x7f120f325080)
        at /moz/aboutstartup3/toolkit/xre/nsAppRunner.cpp:3762
    #69 0x0000000000401cfc in main (argc=4, argv=0x7ffff5e52318)
        at /moz/aboutstartup3/browser/app/nsBrowserApp.cpp:158
     
    0 anonymous(rv = [object Object], type = 4, frame = [xpconnect wrapped jsdIStackFrame @ 0x7f11f8f6cb00 (native @ 0x7f11fc4a9fa0)]) ["resource://firebug/firebug-service.js":1905]
        debuggr = undefined
        value = [xpconnect wrapped jsdIValue @ 0x7f11f8f6cbe0 (native @ 0x7f11f90ef830)]
        this = [object Object]
    1 anonymous([xpconnect wrapped jsdIStackFrame @ 0x7f11f8f6cb00 (native @ 0x7f11fc4a9fa0)], 4, [object Object]) ["resource://firebug/firebug-service.js":3683]
        msg = undefined
        this = [object Object]
    2 PDBU__executeTasks(aTasks = [object Object]) ["resource://gre/modules/PlacesDBUtils.jsm":92]
        task = undefined
        this = [object Object]
    3 PDBU__refreshUI(aTasks = [object Object]) ["resource://gre/modules/PlacesDBUtils.jsm":162]
        tasks = [object Object]
        this = [object Object]
    4 PDBU__executeTasks(aTasks = [object Object]) ["resource://gre/modules/PlacesDBUtils.jsm":80]
        task = [function]
        this = [object Object]
    5 anonymous(aReason = 0) ["resource://gre/modules/PlacesDBUtils.jsm":294]
        this = [object Object]
Luke, looks like your bug? Want to dup it?
The stack makes me think its just a missing enter-compartment from jsdValue::GetStringValue:

    #10 js::assertSameCompartment<JSString*>
    #11 JS_GetStringCharsZAndLength at jsapi.cpp:5308
    #12 jsdValue::GetStringValue at jsd_xpc.cpp:2300
...except that there's currently no way to enter the compartment there, because this is a string that was saved into a JSDValue a while back, without anything that could serve as a global object for entering its compartment.

In my Firebug testing, I see this crash constantly. This is a dupe of bug 628758 (despite the misleading title of that bug; sorry). The patch there fixes this one by wrapping strings into the JSD compartment.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Assignee: general → nobody
Component: JavaScript Engine → JavaScript Debugging APIs
QA Contact: general → jsd
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.