Closed
Bug 301648
Opened 19 years ago
Closed 17 years ago
firefox crashes on startup on solaris with uncaught exceptions
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: funtoos, Assigned: timeless)
Details
(Keywords: crash)
Attachments
(1 file)
|
793 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.4; SunOS) KHTML/3.4.1 (like Gecko)
Build Identifier:
this is seen from the debug run of firefox -g:
nsNativeComponentLoader: autoregistering succeeded
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsINIParser.cpp, line
51
[New LWP 1]
[New LWP 2]
JS Component Loader: ERROR
Program received signal SIGSEGV, Segmentation fault.
0xc5ed4d40 in countbytes () from /usr/lib/libc.so.1
(gdb) bt
#0 0xc5ed4d40 in countbytes () from /usr/lib/libc.so.1
#1 0xc5f101b9 in _ndoprnt () from /usr/lib/libc.so.1
#2 0xc5f1210c in fprintf () from /usr/lib/libc.so.1
#3 0xc5639553 in __1cIReporter6FpnJJSContext_pkcpnNJSErrorReport__v_ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#4 0xc55166f7 in js_ReportErrorAgain (cx=0x8099dd8,
message=0x8119d80 "uncaught exception: [Exception... \"Component returned
failure code: 0xc5ce0018 [nsIXPCComponents.ID]\" nsresult: \"0xc5ce0018
(<unknown>)\" location: \"JS frame ::
file:///usr/lib/MozillaFirefox/compone"...,
reportp=0x8046de8) at jscntxt.c:674
#5 0xc5515ee9 in ReportError (cx=0x8099dd8,
message=0x8119d80 "uncaught exception: [Exception... \"Component returned
failure code: 0xc5ce0018 [nsIXPCComponents.ID]\" nsresult: \"0xc5ce0018
(<unknown>)\" location: \"JS frame ::
file:///usr/lib/MozillaFirefox/compone"...,
reportp=0x8046de8) at jscntxt.c:335
#6 0xc5516648 in js_ReportErrorNumberVA (cx=0x8099dd8, flags=0,
callback=0xc5516778 <js_GetErrorMessage>,
userRef=0x0, errorNumber=147, charArgs=1, ap=0x8046e70) at jscntxt.c:630
#7 0xc550ff98 in JS_ReportErrorNumber (cx=0x8099dd8, errorCallback=0xc5516778
<js_GetErrorMessage>, userRef=0x0,
errorNumber=147, ...=0x81193f8) at jsapi.c:3960
#8 0xc552cf2b in js_ReportUncaughtException (cx=0x8099dd8) at jsexn.c:1072
#9 0xc550f614 in JS_ExecuteScript (cx=0x8099dd8, obj=0x80ed6b0,
script=0x811a9e0, rval=0x8046fcc) at jsapi.c:3543
#10 0xc563c31e in
__1cUmozJSComponentLoaderRGlobalForLocation6MpkcpnHnsIFile__pnIJSObject__ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#11 0xc563ba36 in
__1cUmozJSComponentLoaderRModuleForLocation6MpkcpnHnsIFile__pnJnsIModule__ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#12 0xc563b23b in
__1cUmozJSComponentLoaderTAttemptRegistration6MpnHnsIFile_i_I_ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#13 0xc563af5e in
__1cUmozJSComponentLoaderVAutoRegisterComponent6MipnHnsIFile_pi_I_ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#14 0xc563aca0 in
__1cUmozJSComponentLoaderXRegisterComponentsInDir6MipnHnsIFile__I_ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#15 0xc563ab29 in
__1cUmozJSComponentLoaderWAutoRegisterComponents6MipnHnsIFile__I_ ()
from /usr/lib/MozillaFirefox/components/libxpconnect.so
#16 0xc58fd045 in
__1cWnsComponentManagerImplbFAutoRegisterNonNativeComponents6MpnHnsIFile__I_
()
at nsComponentManager.cpp:3280
#17 0xc58fce12 in
__1cWnsComponentManagerImplQAutoRegisterImpl6MipnHnsIFile_i_I_ () at
nsComponentManager.cpp:3250
#18 0xc58fd4e0 in __1cWnsComponentManagerImplMAutoRegister6MpnHnsIFile__I_
(this=<incomplete type>, aSpec=0x0)
at nsComponentManager.cpp:3422
#19 0xc58a5191 in NS_InitXPCOM2 (result=0x0, binDirectory=0x0,
appFileLocationProvider=0x808d000)
at nsXPComInit.cpp:593
#20 0x080569fb in NS_InitXPCOM2 ()
at ../../../dist/include/xpcom/nsCOMPtr.h:1134
---Type <return> to continue, or q <return> to quit---
#21 0x08055057 in __1cNstartup_xpcom6F_i_ () at regxpcom.cpp:167
#22 0x080556db in main (argc=1, argv=0x8047638, __ptr_return=0x1,
aSmartPtr=<incomplete type>, __ptr_return=0x1,
aSmartPtr=<incomplete type>, aPtr=<incomplete type>, aPtr=<incomplete
type>) at regxpcom.cpp:389
(gdb) frame 4
#4 0xc55166f7 in js_ReportErrorAgain (cx=0x8099dd8,
message=0x8119d80 "uncaught exception: [Exception... \"Component returned
failure code: 0xc5ce0018 [nsIXPCComponents.ID]\" nsresult: \"0xc5ce0018
(<unknown>)\" location: \"JS frame ::
file:///usr/lib/MozillaFirefox/compone"...,
reportp=0x8046de8) at jscntxt.c:674
674 onError(cx, cx->lastMessage, reportp);
Current language: auto; currently c
(gdb) p message
$1 = 0x8119d80 "uncaught exception: [Exception... \"Component returned failure
code: 0xc5ce0018 [nsIXPCComponents.ID]\" nsresult: \"0xc5ce0018 (<unknown>)\"
location: \"JS frame :: file:///usr/lib/MozillaFirefox/compone"...
(gdb) p &message[100]
$3 = 0x8119de4 "\" nsresult: \"0xc5ce0018 (<unknown>)\" location: \"JS
frame :: file:///usr/lib/MozillaFirefox/components/nsSample.js ::
<TOP_LEVEL> :: line 92\" data: no]"
(gdb) p &message[120]
$4 = 0x8119df8 "0018 (<unknown>)\" location: \"JS frame ::
file:///usr/lib/MozillaFirefox/components/nsSample.js :: <TOP_LEVEL> :: line
92\" data: no]"
(gdb) p &message[150]
$5 = 0x8119e16 "JS frame ::
file:///usr/lib/MozillaFirefox/components/nsSample.js :: <TOP_LEVEL> :: line
92\" data: no]"
(gdb) p reportp
$6 = (struct JSErrorReport *) 0x8046de8
(gdb) p *reportp
$7 = {filename = 0x0, lineno = 0, linebuf = 0x0, tokenptr = 0x0, uclinebuf =
0x0, uctokenptr = 0x0, flags = 2,
errorNumber = 147, ucmessage = 0x8119518, messageArgs = 0x80fbca0}
(gdb) p *cx
$8 = {links = {next = 0x80f1348, prev = 0x8097a38}, interpLevel = 0,
stackLimit = 0, version = JSVERSION_DEFAULT,
jsop_eq = 18 '\022', jsop_ne = 19 '\023', runtime = 0x8097848, stackPool =
{first = {next = 0x0, base = 134848004,
limit = 134848004, avail = 134848004}, current = 0x8099df4, arenasize =
256, mask = 3}, fp = 0x0, tempPool = {
first = {next = 0x0, base = 134848040, limit = 134848040, avail =
134848040}, current = 0x8099e14,
arenasize = 1024, mask = 7}, globalObject = 0x80ed6b0, newborn = {0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
lastAtom = 0x0, regExpStatics = {input = 0x0, multiline = 0, parenCount = 0,
moreLength = 0, parens = {{length = 0,
chars = 0x0}, {length = 0, chars = 0x0}, {length = 0, chars = 0x0},
{length = 0, chars = 0x0}, {length = 0,
chars = 0x0}, {length = 0, chars = 0x0}, {length = 0, chars = 0x0},
{length = 0, chars = 0x0}, {length = 0,
chars = 0x0}}, moreParens = 0x0, lastMatch = {length = 0, chars =
0xc559c098}, lastParen = {length = 0,
chars = 0xc559c098}, leftContext = {length = 0, chars = 0xc559c098},
rightContext = {length = 0,
chars = 0xc559c098}}, sharpObjectMap = {depth = 0, sharpgen = 0, table =
0x0}, argumentFormatMap = 0x80b5520,
lastMessage = 0x8119e88 "uncaught exception: [Exception... \"Component
returned failure code: 0xc5ce0018 [nsIXPCComponents.ID]\" nsresult:
\"0xc5ce0018 (<unknown>)\" location: \"JS frame ::
file:///usr/lib/MozillaFirefox/compone"...,
tracefp = 0x0, branchCallback = 0, errorReporter = 0xc56393c8
<__1cIReporter6FpnJJSContext_pkcpnNJSErrorReport__v_>,
data = 0x0, dormantFrameChain = 0x0, thread = 134797152, requestDepth = 1,
scopeToShare = 0x0,
lockedSealedScope = 0x0, rval2 = 0, rval2set = 0 '\0', creatingException = 0
'\0', throwing = 1 '\001', exception = 135191016,
options = 0, localeCallbacks = 0x0, resolvingTable = 0x80f4900, stackHeaders =
0x0,
findObjectPrincipals = 0}
(gdb)
Reproducible: Always
Steps to Reproduce:
1. compiled from source firefox 1.0.6 (same result with 1.0.4) with Studio 10
compiler on solaris 10 x86.
2. ran firefox from root.
3. crash on startup
Actual Results:
crash on startup
Expected Results:
should not crash
Please see details aboveThis is a debug compile, so if you need extra information please let me know.
This segv is caused because of this line in
js/src/xpconnect/loader/mozJSComponentLoader.cpp:
#ifdef DEBUG
fprintf(stderr, "JS Component Loader: %s %s:%d\n"
" %s\n",
JSREPORT_IS_WARNING(rep->flags) ? "WARNING" : "ERROR",
rep->filename, rep->lineno,
message ? message : "<no message>");
#endif
basically rep->filename is null, so fprintf dies. debug can't assume anything
now, can it?
So, I just patched this hole,went on and exited with code 1 without core dump.
No windows, nothing. I think the error (JS Component Loader: ERROR) has
already happened by this time, so that's the error we should be looking at.
Can anybody tell me why I am getting that error and what it means? Thanks. I am doing this with a new /.mozilla directory everytime, so no leftovers here.
more debug info for someone who knows what's going on:
----------------------------------------------------------
root@unknown /usr/lib/MozillaFirefox
$ \rm -rf /.mozilla
root@unknown /usr/lib/MozillaFirefox
$ ./firefox-bin
File descriptors set to 512
Type Manifest File: /usr/lib/MozillaFirefox/components/xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsINIParser.cpp, line
51
No Persistent Registry Found.
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsINIParser.cpp, line
51
Type Manifest File: /.mozilla/firefox/zieyjc7h.default/xpti.dat
nsNativeComponentLoader: autoregistering begins.
*** Registering nsTestDynamicModule components (all right -- a generic
module!)
*** Registering MyService components (all right -- a generic module!)
*** Registering nsSampleModule components (all right -- a generic module!)
*** Registering xpcomObsoleteModule components (all right -- a generic
module!)
*** Registering xpconnect components (all right -- a generic module!)
*** Registering xpconnect_test components (all right -- a generic module!)
*** Registering nsUConvModule components (all right -- a generic module!)
*** Registering nsUCvMathModule components (all right -- a generic module!)
*** Registering nsI18nModule components (all right -- a generic module!)
*** Registering nsJarModule components (all right -- a generic module!)
*** Registering nsCJVMManagerModule components (all right -- a generic
module!)
*** Registering necko_core_and_primary_protocols components (all right -- a
generic module!)
*** Registering necko_secondary_protocols components (all right -- a generic
module!)
*** Registering nsPrefModule components (all right -- a generic module!)
*** Registering nsSecurityManagerModule components (all right -- a generic
module!)
*** Registering nsRDFModule components (all right -- a generic module!)
*** Registering nsParserModule components (all right -- a generic module!)
*** Registering nsGfxPSModule components (all right -- a generic module!)
*** Registering nsGfxXprintModule components (all right -- a generic module!)
*** Registering nsGfxGTKModule components (all right -- a generic module!)
*** Registering nsImageLib2Module components (all right -- a generic module!)
*** Registering nsPluginModule components (all right -- a generic module!)
*** Registering nsWidgetGtk2Module components (all right -- a generic module!)
*** Registering XRemoteClientModule components (all right -- a generic
module!)
*** Registering nsLayoutModule components (all right -- a generic module!)
*** Registering nsMorkModule components (all right -- a generic module!)
*** Registering docshell_provider components (all right -- a generic module!)
*** Registering embedcomponents components (all right -- a generic module!)
*** Registering Browser_Embedding_Module components (all right -- a generic
module!)
*** Registering nsEditorModule components (all right -- a generic module!)
*** Registering nsTransactionManagerModule components (all right -- a generic
module!)
*** Registering nsComposerModule components (all right -- a generic module!)
*** Registering appshell components (all right -- a generic module!)
*** Registering nsChromeModule components (all right -- a generic module!)
*** Registering nsAccessibilityModule components (all right -- a generic
module!)
*** Registering mozgnome components (all right -- a generic module!)
*** Registering BOOT components (all right -- a generic module!)
*** Registering NSS components (all right -- a generic module!)
*** Registering PKI components (all right -- a generic module!)
*** Registering nsFileViewModule components (all right -- a generic module!)
*** Registering nsFindComponent components (all right -- a generic module!)
*** Registering XRemoteServiceModule components (all right -- a generic
module!)
*** Registering application components (all right -- a generic module!)
*** Registering nsToolkitCompsModule components (all right -- a generic
module!)
*** Registering nsSoftwareUpdate components (all right -- a generic module!)
*** Registering nsCookieModule components (all right -- a generic module!)
*** Registering nsXMLExtrasModule components (all right -- a generic module!)
*** Registering nsAutoConfigModule components (all right -- a generic module!)
*** Registering nsSystemPrefModule components (all right -- a generic module!)
*** Registering TransformiixModule components (all right -- a generic module!)
*** Registering nsUniversalCharDetModule components (all right -- a generic
module!)
*** Registering WSPProxyTestModule components (all right -- a generic module!)
*** Registering nsWebServicesModule components (all right -- a generic
module!)
*** Registering nsInspectorModule components (all right -- a generic module!)
*** Registering nsGnomeVFSModule components (all right -- a generic module!)
*** Registering nsNegotiateAuthModule components (all right -- a generic
module!)
*** Registering nsBrowserCompsModule components (all right -- a generic
module!)
nsNativeComponentLoader: autoregistering succeeded
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsINIParser.cpp, line
51
JS Component Loader: ERROR no file:0
uncaught exception: [Exception... "Component returned
failure code: 0xc4b20460 [nsIXPCComponents.ID]" nsresult: "0xc4b20460
(<unknown>)" location: "JS frame ::
file:///usr/lib/MozillaFirefox/components/nsSample.js :: <TOP_LEVEL> :: line
92" data: no]
nNCL: registering deferred (0)
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsINIParser.cpp, line
51
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
(firefox-bin:939335): Gdk-WARNING **: gdk_property_get(): length value has
wrapped in calculation (did you pass G_MAXLONG?)
GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
++WEBSHELL == 1
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file
nsPermissionManager.cpp, line 623
++DOMWINDOW == 1
WARNING: NS_ENSURE_TRUE(em) failed, file nsAppRunner.cpp, line 1830
###!!! ASSERTION: Failed to create nsICloseAllWindows impl.: 'closer', file
nsAppShellService.cpp, line 1477
Break: at file nsAppShellService.cpp, line 1477
###!!! ASSERTION: Can't veto change!: 'Error', file nsXREDirProvider.cpp, line
462
Break: at file nsXREDirProvider.cpp, line 462
nsPluginHostImpl::Observe "xpcom-shutdown"
WARNING: nsExceptionService ignoring thread destruction after shutdown, file
nsExceptionService.cpp, line 191
nsPluginHostImpl dtor
--WEBSHELL == 0
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: module CanUnload failed: 'NS_SUCCEEDED(rv)', file
mozJSComponentLoader.cpp, line 430
Break: at file mozJSComponentLoader.cpp, line 430
###!!! ASSERTION: Main thread being held past XPCOM shutdown.: 'cnt == 0',
file nsThread.cpp, line 439
Break: at file nsThread.cpp, line 439
nsStringStats
=> mAllocCount: 5022
=> mReallocCount: 1490
=> mFreeCount: 5020
=> mShareCount: 6969
=> mAdoptCount: 2690
=> mAdoptFreeCount: 2689
root@unknown /usr/lib/MozillaFirefox
$ Assignee: nobody → dbradley
Component: General → XPConnect
Keywords: crash
Product: Firefox → Core
QA Contact: general → pschwartau
Version: unspecified → Trunk
Assignee: dbradley → timeless
Status: UNCONFIRMED → ASSIGNED
Attachment #190105 -
Flags: superreview?(shaver)
Attachment #190105 -
Flags: review?(dbradley)
Comment 6•19 years ago
|
||
So why is the filename NULL? I don't see how that can happen unless NS_GetURLSpecFromFile fails, though I now see that I don't actually check that return value...
i dunno. if this was xpconnect and not spidermonkey, i know that caps has a tendency to veto access to filename properties on exception objects :), but that doesn't apply here. does it relate to the fact that the script is barely running at this point? #8 0xc552cf2b in js_ReportUncaughtException #9 0xc550f614 in JS_ExecuteScript
I find it interesting that the problem doesn't happen if I compile with gcc. BUT I need to compile with studio because none of the plugins work with gcc compiled firefox (and I have no control over those). I minimally need java and flash plugins.
Comment 9•19 years ago
|
||
Vetoing access to filename properties doesn't affect the contents of the error report struct. If there's a bug here it sounds like it's more likely to be in propagation of filename/lineno from no-longer-active scripts to error reporters, via exception objects. What's the exception that's not being caught?
Updated•19 years ago
|
Attachment #190105 -
Flags: superreview?(shaver)
Attachment #190105 -
Flags: review?(dbradley)
Updated•18 years ago
|
QA Contact: pschwartau → xpconnect
Comment 10•18 years ago
|
||
Is it still a problem? I never built Firefox with gcc on Solaris. I know Firefox built with gcc works fine on Nexenta OS (based on OpenSolaris)
Summary: firefox crashes on startup on solaris with uncaught exceptions → firefox (built with gcc) crashes on startup on solaris with uncaught exceptions
Comment 12•17 years ago
|
||
If anyone want to fix it, First, you need to fix DSO_LDOPTS in configure, this option works for me, I'm not sure if it is correct, DSO_LDOPTS = -G -shared -Wl,-z -Wl,muldefs Then, you need to write a .s file for gcc Solaris x86 in xpcom/reflect/xptcall/src/md/unix I'm not sure whether the gcc Solaris sparc one can work well. Third, we don't know yet.
Comment 13•17 years ago
|
||
(In reply to comment #12) > Then, you need to write a .s file for gcc Solaris x86 in > xpcom/reflect/xptcall/src/md/unix > I'm not sure whether the gcc Solaris sparc one can work well. ignore this, the gcc x86 version is in the cpp file. It should work.
Comment 14•17 years ago
|
||
I thought I miss understood the description half year ago. Sunil is building Firefox with SS10. SS11 works for me. BTW: If you really want to compile Firefox with gcc and Sun ld, you need fix MOZ_FIX_LINK_PATHS to -R $(LIBXUL_DIST)/bin
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Summary: firefox (built with gcc) crashes on startup on solaris with uncaught exceptions → firefox crashes on startup on solaris with uncaught exceptions
You need to log in
before you can comment on or make changes to this bug.
Description
•