Closed Bug 111367 Opened 23 years ago Closed 23 years ago

-O3 segv's on startup

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mozilla, Assigned: darin.moz)

Details

if I build with the following config then mozilla will segv immediately on startup:

mk_add_options MOZ_MAKE_FLAGS=-j2
ac_add_options --enable-crypto
ac_add_options --enable-optimize=-O3
ac_add_options --disable-debug
ac_add_options --enable-strip-libs
ac_add_options --disable-tests

changing the -O3 to -O2 and it works fine, just slower. ;)

the backtrace from the coredump looks like this (not very helpfull given that
it's an optimized build):

#0  0xe965884 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#1  0xe965f24 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#2  0xe967ff5 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#3  0xe9aed62 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#4  0xe95ce3a in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#5  0xe9b3ead in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#6  0xe9b3cd0 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#7  0xe950de7 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#8  0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#9  0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#10 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#11 0xe95bac9 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#12 0xe95cdd0 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#13 0xe70d493 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#14 0xe710fde in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#15 0xe711525 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#16 0xe710e1b in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#17 0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#18 0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#19 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#20 0xe159e00 in nsGetServiceByContractID::operator() () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#21 0xe1a433e in nsCOMPtr_base::assign_from_helper () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#22 0xe14d47a in nsFSStringConversion::PrepareFSCharset () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#23 0xe14d543 in nsFSStringConversion::PrepareEncoder () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#24 0xe14e2ca in NS_NewUnicodeLocalFile () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#25 0xe93ac96 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#26 0xe93700e in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#27 0xe93b143 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#28 0xe92a677 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#29 0xe934f86 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#30 0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#31 0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#32 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#33 0xe159e00 in nsGetServiceByContractID::operator() () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#34 0xe1a433e in nsCOMPtr_base::assign_from_helper () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#35 0xe790911 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnsappshell.so
#36 0x804ece9 in _start ()
#37 0x80500a2 in _start ()
#38 0x8050c1f in main ()
#39 0xe508c6f in __libc_start_main () from /lib/libc.so.6

This just started in the last 10 days, but has been happening for at least 2
days now (while I tried to figure out what it was that was broken). The tree I'm
working on is checkout dated Tue Nov 20 20:03:31 CST 2001. The system is SuSE
7.2 with full updates, gcc version 2.95.3 20010315 (SuSE), glibc is 2.2.2.

Once I scrape up some free disk space I'll rebuild without stripping the libs
and see what I can come up with for a better location.
just rebuilt necko without stripping it, new backtrace:

#0  0xe984004 in nsStandardURL::ParseURL () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#1  0xe9846a4 in nsStandardURL::SetSpec () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#2  0xe986775 in nsStandardURL::Init () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#3  0xe9cd4e2 in nsFileProtocolHandler::NewURI () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#4  0xe97b5ba in nsIOService::NewURI () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#5  0xe9d262d in nsResProtocolHandler::SetSpecialDir () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#6  0xe9d2450 in nsResProtocolHandler::Init () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#7  0xe96f567 in nsResProtocolHandlerConstructor () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#8  0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#9  0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#10 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#11 0xe97a249 in nsIOService::GetProtocolHandler () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#12 0xe97b550 in nsIOService::NewURI () from
/usr/src/moz/optbld/dist/bin/components/libnecko.so
#13 0xe70d493 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#14 0xe710fde in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#15 0xe711525 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#16 0xe710e1b in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libuconv.so
#17 0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#18 0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#19 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#20 0xe159e00 in nsGetServiceByContractID::operator() () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#21 0xe1a433e in nsCOMPtr_base::assign_from_helper () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#22 0xe14d47a in nsFSStringConversion::PrepareFSCharset () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#23 0xe14d543 in nsFSStringConversion::PrepareEncoder () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#24 0xe14e2ca in NS_NewUnicodeLocalFile () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#25 0xe93ac96 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#26 0xe93700e in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#27 0xe93b143 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#28 0xe92a677 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#29 0xe934f86 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libprofile.so
#30 0xe1617f3 in nsGenericFactory::CreateInstance () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#31 0xe15f92e in nsComponentManagerImpl::CreateInstanceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#32 0xe15ca24 in nsComponentManagerImpl::GetServiceByContractID () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#33 0xe159e00 in nsGetServiceByContractID::operator() () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#34 0xe1a433e in nsCOMPtr_base::assign_from_helper () from
/usr/src/moz/optbld/dist/bin/libxpcom.so
#35 0xe790911 in NSGetModule () from
/usr/src/moz/optbld/dist/bin/components/libnsappshell.so
#36 0x804ece9 in _start ()
#37 0x80500a2 in _start ()
#38 0x8050c1f in main ()
#39 0xe508c6f in __libc_start_main () from /lib/libc.so.6
Related: bug 62719, bug 53486, meta bug 71874.
This is likely related to darin's changes, from the stack.
Assignee: neeti → darin
interesting, well.. i don't have GCC 2.95.3 installed anywhere, but i do have
GCC 2.96-96, so i'll try to repro this bug with that.
WFM w/ GCC 2.96-96
"2.96-96" isn't an official gcc release number, perhaps this is some version
your distro of choice hacked together? Neither for that matter is the version
"2.95.4" that the gcc295 tinderbox is running. I've swapped my SuSE compiled
2.95.3 for raw 2.95.3 from gnu.org (the most current 2.9x.y release they've
made) and get the same results from today's tree.
2.96-96 is from redhat rawhide, and yeah of course it's not an official compiler
release, but it is an interesting data point to know that it works.

as i understand it, GCC 2.95 is known to have problems compiling mozilla with
any setting above -O.  there are other bugs which cover making mozilla use
-02... perhaps you should make this bug a dependency of one of those.  see the
bugs Olivier posted.
yeah, I figured that's where it came from. ;)  but there is so much 3.0 stuff
they've brought back it's hard to figure which of those numerous changes is
fixing the optimizer bug which some change in moz is hitting.

In any case this exact config has worked just fine up until about the 18th of
November.
This seems to have cleared up in the last two days. Nothing has changed in my
setup, I just did the usual pull_all in my source directory, then walked each of
the three build trees I've been keeping lately and brought them up to date with
make. The -O3 tree no longer segvs on startup. (I'm running it now as a matter
of fact.)
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
:-)
You need to log in before you can comment on or make changes to this bug.