Closed Bug 321771 Opened 20 years ago Closed 20 years ago

crash (SEGV) on first-time run (only) of each new build - nsJSContext nsContentUtils::XPConnect()->SyncJSContexts()

Categories

(Calendar :: Internal Components, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: calum.mackay, Unassigned)

Details

(Keywords: crash)

Attachments

(1 file)

Linux/x86. I build locally from CVS. For a little while now, I've noted that the first run of any new build always crashes immediately on startup. The crash is apparently preceded by an error, possibly unrelated. On subsequent starts of this build, all is well: no error, no crash. Everything will be fine until I make a new build, and then it will crash, just the first-time. Here's an example with a build of a few hours ago, from a checkout of 20051228. *** Calendar schema version is: 4 observer added [New Thread -1258382416 (LWP 17047)] [Thread -1240040528 (LWP 17045) exited] [Thread -1258382416 (LWP 17047) exited] observer removed Parsing the file failed:[Exception... "Component returned failure code: 0x804a0100 [calIICSService.parseICS]" nsresult: "0x804a0100 (<unknown>)" location: "JS frame :: file:///usr/local/src/mozilla/sunbird/sunbird-200512290124/components/calICSCalendar.js :: anonymous :: line 396" data: no] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1220494880 (LWP 17040)] nsJSContext (this=0x8420dc0, aRuntime=0x80e5388) at nsJSEnvironment.cpp:702 /usr/local/src/mozilla/cvs/mozilla/dom/src/base/nsJSEnvironment.cpp:702:22275:beg:0xb68ec7b1 (gdb) bt #0 nsJSContext (this=0x8420dc0, aRuntime=0x80e5388) at nsJSEnvironment.cpp:702 #1 0xb68ec8b2 in nsJSEnvironment::CreateNewContext (aContext=0xbfc5ff70) at nsJSEnvironment.cpp:2399 #2 0xb68eda2b in NS_CreateScriptContext (aGlobal=0x82a7204, aContext=0xb69bdb38) at nsJSEnvironment.cpp:2414 #3 0xb691e5c1 in nsDOMScriptObjectFactory::NewScriptContext (this=0x844f760, aGlobal=0x82a7204, aContext=0xbfc5ffc8) at nsDOMScriptObjectFactory.cpp:103 #4 0xb65775dd in nsDocShell::EnsureScriptEnvironment (this=0x83b5e50) at nsDocShell.cpp:8253 #5 0xb65728c9 in nsDocShell::GetInterface (this=0x83b5e50, aIID=@0xb64f9810, aSink=0xbfc600b4) at nsDocShell.cpp:394 #6 0xb6582052 in nsWebShell::GetInterface (this=0x83b5e50, aIID=@0xb69bdb38, aInstancePtr=0xbfc600b4) at nsWebShell.cpp:250 #7 0xb7e0f764 in nsGetInterface::operator() (this=0xbfc600e8, aIID=@0xb64f9810, aInstancePtr=0xbfc600b4) at nsIInterfaceRequestorUtils.cpp:53 #8 0xb7e0e92d in nsCOMPtr_base::assign_from_helper (this=0xbfc600d4, helper=@0x0, iid=@0xb69bdb38) at nsCOMPtr.cpp:150 #9 0xb64f4c9f in nsAppShellService::RegisterTopLevelWindow (this=0x8384198, aWindow=0x8195a18) at nsCOMPtr.h:694 #10 0xb64f43b0 in nsAppShellService::CreateTopLevelWindow (this=0x8384198, aParent=0x0, aUrl=0x0, aChromeMask=3221225473, aInitialWidth=-1, aInitialHeight=-1, aAppShell=0x83642f8, aResult=0xbfc60184) at nsAppShellService.cpp:239 #11 0xb63f1b26 in nsAppStartup::CreateChromeWindow2 (this=0x83642b8, aParent=0x0, aChromeFlags=3221225473, aContextFlags=0, aURI=0x8445860, aCancel=0xbfc6031c, _retval=0xbfc6030c) at nsAppStartup.cpp:456 #12 0xb6547591 in nsWindowWatcher::OpenWindowJS (this=0x8365100, aParent=0x0, aUrl=0x8251fa8 "chrome://calendar/content/calErrorPrompt.xul", aName=0x8107198 "_blank", aFeatures=0x826f160 "chrome,dialog=yes", aDialog=1, argc=1, argv=0x809eb28, _retval=0xbfc605d4) at nsWindowWatcher.cpp:657 #13 0xb6545da6 in nsWindowWatcher::OpenWindow (this=0x8365100, aParent=0x0, aUrl=0x8251fa8 "chrome://calendar/content/calErrorPrompt.xul", aName=0x8107198 "_blank", aFeatures=0x826f160 "chrome,dialog=yes", aArguments=0x83c4418, _retval=0xbfc605d4) at nsWindowWatcher.cpp:474 #14 0xb7e643c1 in XPTC_InvokeByIndex () at xptcinvoke_gcc_x86_unix.cpp:50 #15 0xb721a7a2 in XPCWrappedNative::CallMethod (ccx=@0xbfc606a8, mode=XPCWrappedNative::CALL_METHOD) at xpcwrappednative.cpp:2152 #16 0xb721f2d6 in XPC_WN_CallMethod (cx=0x81ded68, obj=0x818f408, argc=5, argv=0x0, vp=0xbfc607c8) at xpcwrappednativejsops.cpp:1444 #17 0xb7eb9a1d in js_Invoke (cx=0x81ded68, argc=5, flags=0) at jsinterp.c:1229 #18 0xb7ec25ca in js_Interpret (cx=0x81ded68, pc=0x83ac7bd ":", result=0xbfc60a94) at jsinterp.c:3778 #19 0xb7eb9a7a in js_Invoke (cx=0x81ded68, argc=2, flags=2) at jsinterp.c:1253 #20 0xb7217ff1 in nsXPCWrappedJSClass::CallMethod (this=0x8410b40, wrapper=0x0, methodIndex=10, info=0x83c9d68, nativeParams=0xbfc60db8) at xpcwrappedjsclass.cpp:1376 #21 0xb7213276 in nsXPCWrappedJS::CallMethod (this=0x8421a60, methodIndex=56120, info=0x83c9d68, params=0xbfc60db8) at xpcwrappedjs.cpp:465 #22 0xb7e64f2e in PrepareAndDispatch (methodIndex=<value optimized out>, self=0x8421a60, args=0x2) at xptcstubs_gcc_x86_unix.cpp:100 #23 0xb7e643c1 in XPTC_InvokeByIndex () at xptcinvoke_gcc_x86_unix.cpp:50 #24 0xb721a7a2 in XPCWrappedNative::CallMethod (ccx=@0xbfc610f4, mode=XPCWrappedNative::CALL_METHOD) at xpcwrappednative.cpp:2152 #25 0xb721f2d6 in XPC_WN_CallMethod (cx=0x81ded68, obj=0x83bfd68, argc=2, argv=0x0, vp=0xbfc61214) at xpcwrappednativejsops.cpp:1444 #26 0xb7eb9a1d in js_Invoke (cx=0x81ded68, argc=2, flags=0) at jsinterp.c:1229 #27 0xb7ec25ca in js_Interpret (cx=0x81ded68, pc=0x81b9705 ":", result=0xbfc614e0) at jsinterp.c:3778 #28 0xb7eb9a7a in js_Invoke (cx=0x81ded68, argc=5, flags=2) at jsinterp.c:1253 #29 0xb7217ff1 in nsXPCWrappedJSClass::CallMethod (this=0x84154e8, wrapper=0x0, methodIndex=3, info=0x81e14b0, nativeParams=0xbfc61804) at xpcwrappedjsclass.cpp:1376 #30 0xb7213276 in nsXPCWrappedJS::CallMethod (this=0x8415528, methodIndex=56120, info=0x81e14b0, params=0xbfc61804) at xpcwrappedjs.cpp:465 #31 0xb7e64f2e in PrepareAndDispatch (methodIndex=<value optimized out>, self=0x8415528, args=0x5) at xptcstubs_gcc_x86_unix.cpp:100 #32 0xb7088112 in nsStreamLoader::OnStopRequest (this=0x84153c0, request=0x847ad84, ctxt=0x8410fb8, aStatus=2152398918) at nsStreamLoader.cpp:117 #33 0xb707ae3d in nsOnStopRequestEvent::HandleEvent (this=0x81f3960) at nsRequestObserverProxy.cpp:214 #34 0xb707a8d2 in nsARequestObserverEvent::HandlePLEvent (plev=0x81f3964) at nsRequestObserverProxy.cpp:115 #35 0xb7e4d50a in PL_HandleEvent (self=0x81f3964) at plevent.c:688 #36 0xb7e4d41c in PL_ProcessPendingEvents (self=0x809a508) at plevent.c:623 #37 0xb7e4ebc1 in nsEventQueueImpl::ProcessPendingEvents (this=0x809a4c0) at nsEventQueue.cpp:417 #38 0xb7e15ab5 in NS_ShutdownXPCOM_P (servMgr=0x807a94c) at nsXPComInit.cpp:745 #39 0xb7f16d5c in ~ScopedXPCOMStartup (this=0xbfc61ba8) at nsAppRunner.cpp:553 #40 0xb7f1abe7 in XRE_main (argc=2, argv=0xbfc61d34, aAppData=0x80497e0) at nsAppRunner.cpp:2333 #41 0x08048623 in main (argc=2, argv=0xbfc61d34) at nsCalendarApp.cpp:62 "bt full" output will be attached
Attached file gdb output: bt full —
full stacktrace from gdb "bt full"
well, the attachment seems to be truncated; sigh. Still, it has the first 18 frames.
My best guess here is that we're guilty of opening a window too soon. I don't like seeing 'RegisterTopLevelWindow' here, since the calErrorPrompt.xul isn't meant to be a top window. My guess is that solving bug 313627 will make this crash disappear. This also makes me wonder if we can crash as well if we start trying to fire missed alarms, sine those windows will open pretty early too. In general, we need to find some way to queue events from the components until the front-end is ready to handle them.
Keywords: crash
thanks; the odd thing, of course, is that it only seems to happen for the first-ever run of a new build, and then not thereafter. Is there anything more I can do - e.g. with gdb - to help narrow it down?
I haven't seen the problem in recent builds.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: