Closed
Bug 191979
Opened 22 years ago
Closed 22 years ago
Crash on startup when --enable-xpcom-lea
Categories
(Core :: XPCOM, defect)
Tracking
()
People
(Reporter: ervin.nemeth+org.mozilla.bugzilla, Assigned: dougt)
Details
Attachments
(1 file)
2.39 KB,
text/plain
|
Details |
User-Agent: Mozilla/4.8 [en] (X11; U; Linux 2.4.19 i686)
Build Identifier: Mozilla 1.3b, Copyright (c) 2003 mozilla.org, build 2003020505
(gdb) run
Starting program: /usr/src/misc/Mozilla/obj/xpfe/bootstrap/mozilla-bin
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...[New Thread 16384 (LWP 12605)]
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 12605)]
0x4071a56b in mallopt () from /opt/Mozilla/bin/libxpcom.so
(gdb) backtrace
#0 0x4071a56b in mallopt () from /opt/Mozilla/bin/libxpcom.so
#1 0x407199c9 in realloc () from /opt/Mozilla/bin/libxpcom.so
#2 0x400dbd4c in PR_Realloc () from /opt/Mozilla/bin/libnspr4.so
#3 0x4073a18d in nsVoidArray::SizeTo(int) () from /opt/Mozilla/bin/libxpcom.so
#4 0x4073a2fa in nsVoidArray::GrowArrayBy(int) ()
from /opt/Mozilla/bin/libxpcom.so
#5 0x4073a850 in nsVoidArray::InsertElementAt(void*, int) ()
from /opt/Mozilla/bin/libxpcom.so
#6 0x40776bdf in nsComponentManagerImpl::ReadPersistentRegistry() ()
from /opt/Mozilla/bin/libxpcom.so
#7 0x4071baed in NS_InitXPCOM2 () from /opt/Mozilla/bin/libxpcom.so
#8 0x080792d9 in nsASingleFragmentString::~nsASingleFragmentString() ()
#9 0x08057105 in main ()
#10 0x40560d24 in __libc_start_main () from /lib/libc.so.6
Reproducible: Always
Steps to Reproduce:
1. start Mozilla
Actual Results:
segmentation fault
Build 20030203 was working for me.
Reporter | ||
Comment 1•22 years ago
|
||
Forgot to mention: this Mozilla is home-built from CVS.
Summary: crash (segmentation fault) at startup
Comment 2•22 years ago
|
||
please recompile with debug symbols (do not specify --disable-debug)
Comment 3•22 years ago
|
||
or just --enable-optimize="-g -O"
Reporter | ||
Comment 4•22 years ago
|
||
It seems my optimizer options have overridden "-g" on --enable-debug but at least assertions are now on:
mozilla-bin: /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:2308: do_check_chunk: Assertion `((char*)p + sz) <= ((char*)(av->sbrk_base) + av->sbrked_mem)' failed.
I will now try to add "-g".
Comment 5•22 years ago
|
||
optimization shouldn't override debug. make sure you don't have --enable-strip
Reporter | ||
Comment 6•22 years ago
|
||
Backtrace with debugging symbols:
(gdb) run
Starting program: /usr/src/misc/Mozilla/obj/xpfe/bootstrap/mozilla-bin
[New Thread 16384 (LWP 29400)]
mozilla-bin: /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:2308:
do_check_chunk: Assertion `((char*)p + sz) <= ((char*)(av->sbrk_base) +
av->sbrked_mem)' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 16384 (LWP 29400)]
0x4057c681 in kill () from /lib/libc.so.6
(gdb) backtrace
#0 0x4057c681 in kill () from /lib/libc.so.6
#1 0x4011539d in raise () from /lib/libpthread.so.0
#2 0x4057e03b in abort () from /lib/libc.so.6
#3 0x40575174 in __assert_fail () from /lib/libc.so.6
#4 0x4075d4c0 in do_check_chunk (p=0x4011bb44)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:2328
#5 0x4075d9e1 in do_check_malloc_state ()
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:2573
#6 0x4075cf76 in sYSMALLOc (nb=80, av=0x408b4f80)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:2960
#7 0x4075b920 in mALLOc (bytes=0)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:3438
#8 0x4075c5eb in cALLOc (n_elements=1, elem_size=0)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:4157
#9 0x4075b282 in calloc (n=0, elem_size=0)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/malloc.c:1272
#10 0x405685ae in add_module () from /lib/libc.so.6
#11 0x4056810b in read_conf_file () from /lib/libc.so.6
#12 0x40567994 in __gconv_read_conf () from /lib/libc.so.6
#13 0x40113304 in pthread_once () from /lib/libpthread.so.0
#14 0x405663ad in __gconv_compare_alias () from /lib/libc.so.6
#15 0x40571c21 in _nl_find_locale () from /lib/libc.so.6
#16 0x40570807 in setlocale () from /lib/libc.so.6
#17 0x407c781a in NS_StartupNativeCharsetUtils ()
at /usr/src/misc/Mozilla/mozilla/xpcom/io/nsNativeCharsetUtils.cpp:784
#18 0x4075e13c in NS_InitXPCOM2 (result=0xbffff730, binDirectory=0x0,
appFileLocationProvider=0x80e8090)
at /usr/src/misc/Mozilla/mozilla/xpcom/build/nsXPComInit.cpp:413
#19 0x0808df07 in NS_InitXPCOM2 (result=0x0, binDirectory=0x0,
appFileLocationProvider=0x0)
at /usr/src/misc/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:136
#20 0x0808e20f in GRE_Startup ()
at /usr/src/misc/Mozilla/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp:240
#21 0x08065565 in main (argc=0, argv=0x80e8090)
at /usr/src/misc/Mozilla/mozilla/xpfe/bootstrap/nsAppRunner.cpp:1568
#22 0x40564d24 in __libc_start_main () from /lib/libc.so.6
Comment 7•22 years ago
|
||
build 20030208 from CVS doesn't crash for me on Linux. Can you update your CVS
tree ?
What compiler and compiler flags do you use ?
Summary: Crash on startup → Crash on startup [@ do_check_chunk ]
Reporter | ||
Comment 8•22 years ago
|
||
I'm building M. with "make -f client.mk" which updates the source tree.
Compiler is gcc-3.2
CFLAGS="-pipe -O3 -march=pentium3 -mmmx -msse -mfpmath=sse,387 -funroll-loops
-maccumulate-outgoing-args -fforce-addr -fprefetch-loop-arrays
-fmove-all-movables -freduce-all-givs -g"
LDFLAGS="-Wl,-O1,-z,combreloc"
Hm, yes, perhaps I should try without "-fforce-addr". If there are no more ideas.
Comment 9•22 years ago
|
||
you're over optimizing, Mozilla is not ready yet, see bug 53486.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 10•22 years ago
|
||
just -O3 with gcc3.2 should work fine and run quite snappily.
Reporter | ||
Comment 11•22 years ago
|
||
Olivier, your bug resoultion is not accpted, because
1. for now this is only a guess,
2. this is a bug and bugs don't get fixed by saying "don't use it".
See, I'm compiling Mozilla myself so it can run faster. I have built my entire
system with these options (well in addition to -fomit-frame-pointer but you now
that issue) and I've built Mozilla with them since gcc3. And this is a couple
of month ago. And my system (along with mozilla) never crashed.
Look, this bug has gotten into mozilla a week ago and this is either mozilla's
or gcc's fault. Just help to find this out. I'll try my best to assist you.
Comment 12•22 years ago
|
||
-fforce-addr is enabled by -O2.
the problem is not so much that the options are not supposed to work (although
that is the case with some), but that nobody else is using them and therefore
you're the only one seeing this problem.
it would be nice (if nothing else) to verify that the compiler options are the
problem and which source file has problems with it.
if this is a problem with optimization, it could also be a gcc bug.
Reporter | ||
Comment 13•22 years ago
|
||
Only -fforce-mem is turned on with -O2. -fforce-addr is never turned on by any
other flag. Just checked.
Reporter | ||
Comment 14•22 years ago
|
||
I've completed 2 builds (taking 6 hours each). The last with "-pipe -O2
-march=pentium3 -mmmx -msse -mfpmath=sse,387 -g". Result is the same, mozilla
gets the assertion.
To be on the safe side I have just started a compiling with a "-O -g".
Reporter | ||
Comment 15•22 years ago
|
||
Reporter | ||
Comment 16•22 years ago
|
||
Ok, now I have a mozilla built with "-O -g" that is still crashing. See
previous attachment for backtrace log.
Keywords: crash
Summary: Crash on startup [@ do_check_chunk ]
Updated•22 years ago
|
Summary: Crash on startup [@ do_check_chunk ]
Reporter | ||
Comment 17•22 years ago
|
||
Upgraded gcc to 3.2.2, rebuilt mozilla (with "-O -g"). Assertion persists.
Reporter | ||
Comment 18•22 years ago
|
||
Is it right that malloc.c is last modified 20021016? If so, is it possible that
NS_StartupNativeCharsetUtils is causing the problem?
And may it be that its related to the fact that I'm building mozilola without
freetype2 and xft?
Summary: Crash on startup [@ do_check_chunk ]
Reporter | ||
Comment 19•22 years ago
|
||
Obviously this bug was not related to font subsystem.
I disabled "lea" (--enable-xpcom-lea), now mozilla is operating perfectly.
Summary: Crash on startup when --enable-xpcom-lea
Assignee | ||
Comment 20•22 years ago
|
||
Ervin,
in mozilla/xpfe/bootstrap/Makefile.in, can you set GRE_BUILD to 0 and rebuild
with lea. Does that work?
Reporter | ||
Comment 21•22 years ago
|
||
Sorry, Doug, that didn't help.
Comment 23•22 years ago
|
||
dupe of "Lea memory allocator breaks in most Unices"
*** This bug has been marked as a duplicate of 73053 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•