Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2013 00:04:58 -0400
From:      Naram Qashat <cyberbotx@cyberbotx.com>
To:        freebsd-ports@FreeBSD.org
Subject:   Firefox 21.0 bus error and segfault
Message-ID:  <5199A0EA.2080008@cyberbotx.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I had just recently built Firefox 21.0 (my port version is 21.0_1,1) and I have 
been running into both bus errors and segfaults, depending on how I build 
Firefox. I usually build my ports via portupgrade and use portconf for options. 
With Firefox, I have GIO, LOGGING, and WEBRTC unset, and I have OPTIMIZED_CFLAGS 
set. I am running 8.3-RELEASE-p4 on amd64.

When I build Firefox with just the above, I get a bus error with the following 
backtrace in gdb:

Program received signal SIGBUS, Bus error.
[Switching to Thread 8013021c0 (LWP 100207 initial thread)]
0x0000000000419d55 in realloc ()
(gdb) bt
#0  0x0000000000419d55 in realloc ()
#1  0x0000000800fca61e in ?? () from /lib/libc.so.7
#2  0x0000000800fca9b1 in ?? () from /lib/libc.so.7
#3  0x0000000800fcb23c in setenv () from /lib/libc.so.7
#4  0x0000000000402510 in ?? ()
#5  0x0000000000402a9e in _start ()

I have also tried to build Firefox with DEBUG set and OPTIMIZED_CFLAGS unset. 
When I do this, Firefox runs, but I then run into a segfault if I do enough back 
and forth browsing in a single tab. Unfortunately I cannot reproduce this 
reliably. I get the following inside of gdb:

Assertion failure: mDocument->IsXUL() || mDocument->GetReadyStateEnum() == 
nsIDocument::READYSTATE_INTERACTIVE || (mDocument->GetReadyStateEnum() == 
nsIDocument::READYSTATE_UNINITIALIZED && 
NS_IsAboutBlank(mDocument->GetDocumentURI())) (Bad readystate), at 
/usr/ports/www/firefox/work/mozilla-release/layout/base/nsDocumentViewer.cpp:1029

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8013021c0 (LWP 101982 initial thread)]
0x00000008023dd14e in ?? () from /usr/local/lib/firefox/libxul.so
(gdb) bt
#0  0x00000008023dd14e in ?? () from /usr/local/lib/firefox/libxul.so
#1  0x0000000803643f88 in ?? () from /usr/local/lib/firefox/libxul.so
#2  0x00000008036435b0 in ?? () from /usr/local/lib/firefox/libxul.so
#3  0x00000008036774dd in ?? () from /usr/local/lib/firefox/libxul.so
#4  0x00000008036763a9 in ?? () from /usr/local/lib/firefox/libxul.so
#5  0x0000000803675f98 in ?? () from /usr/local/lib/firefox/libxul.so
#6  0x0000000803675a3f in ?? () from /usr/local/lib/firefox/libxul.so
#7  0x000000080205022d in ?? () from /usr/local/lib/firefox/libxul.so
#8  0x0000000802197668 in ?? () from /usr/local/lib/firefox/libxul.so
#9  0x0000000802041b54 in ?? () from /usr/local/lib/firefox/libxul.so
#10 0x00000008020412d8 in ?? () from /usr/local/lib/firefox/libxul.so
#11 0x00000008045cb4f7 in ?? () from /usr/local/lib/firefox/libxul.so
#12 0x00000008045f1321 in ?? () from /usr/local/lib/firefox/libxul.so
#13 0x00000008045763d2 in ?? () from /usr/local/lib/firefox/libxul.so
#14 0x0000000803bf18e0 in ?? () from /usr/local/lib/firefox/libxul.so
#15 0x000000080464da85 in ?? () from /usr/local/lib/firefox/libxul.so
#16 0x000000080464da16 in ?? () from /usr/local/lib/firefox/libxul.so
#17 0x000000080464d9a7 in ?? () from /usr/local/lib/firefox/libxul.so
#18 0x0000000803a76452 in ?? () from /usr/local/lib/firefox/libxul.so
#19 0x0000000803746d4c in ?? () from /usr/local/lib/firefox/libxul.so
#20 0x0000000801ff88d6 in ?? () from /usr/local/lib/firefox/libxul.so
#21 0x0000000801ff8b97 in ?? () from /usr/local/lib/firefox/libxul.so
#22 0x0000000801ff8db2 in XRE_main () from /usr/local/lib/firefox/libxul.so
#23 0x000000000040322b in ?? ()
#24 0x000000000040360c in ?? ()
#25 0x00000000004025de in _start ()

I'm not sure why the backtrace with DEBUG set still shows no debugging symbols. 
In any case, regarding the bus error, I have no idea why this is happening. I 
have not updated FreeBSD itself, and I had Firefox 20 running fine prior to the 
update to Firefox 21, but after Firefox 21, even Firefox 20 gives me a bus error 
(it's pretty much the same backtrace as above).

The only other thing I can point out is that I have libstdc++.so.6 and 
libgcc_s.so.1 libmapped to the gcc47 versions of those.

Thanks,
Naram Qashat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5199A0EA.2080008>