Closed Bug 191979 Opened 22 years ago Closed 22 years ago

Crash on startup when --enable-xpcom-lea

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 73053

People

(Reporter: ervin.nemeth+org.mozilla.bugzilla, Assigned: dougt)

Details

Attachments

(1 file)

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.
Forgot to mention: this Mozilla is home-built from CVS.
Summary: crash (segmentation fault) at startup
please recompile with debug symbols (do not specify --disable-debug)
Severity: blocker → critical
Keywords: crash
Summary: Crash on startup
or just --enable-optimize="-g -O"
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".
optimization shouldn't override debug. make sure you don't have --enable-strip
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
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 ]
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.
you're over optimizing, Mozilla is not ready yet, see bug 53486.
Status: UNCONFIRMED → NEW
Ever confirmed: true
just -O3 with gcc3.2 should work fine and run quite snappily.
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.
-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.
Only -fforce-mem is turned on with -O2. -fforce-addr is never turned on by any other flag. Just checked.
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".
Attached file gdb backtrace
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 ]
Summary: Crash on startup [@ do_check_chunk ]
Upgraded gcc to 3.2.2, rebuilt mozilla (with "-O -g"). Assertion persists.
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 ]
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
Ervin, in mozilla/xpfe/bootstrap/Makefile.in, can you set GRE_BUILD to 0 and rebuild with lea. Does that work?
Sorry, Doug, that didn't help.
i am not sure how to fix this.
Severity: critical → normal
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.

Attachment

General

Creator:
Created:
Updated:
Size: