Closed Bug 57454 Opened 24 years ago Closed 22 years ago

Crash on startup on OpenBSD

Categories

(SeaMonkey :: Build Config, defect, P3)

x86
OpenBSD
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 124958
Future

People

(Reporter: MatsPalmgren_bugz, Assigned: cls)

Details

(Keywords: crash)

Downloaded source tarball dated 2000-10-19. configure/gmake without any 
arguments. Platform is OpenBSD-2.7/i386; compiler: gcc 2.95.2

Crash on startup:
bin> ./mozilla
./run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=.
  LD_LIBRARY_PATH=.
     LIBRARY_PATH=.:./components
       SHLIB_PATH=.
          LIBPATH=.
       ADDON_PATH=.
      MOZ_PROGRAM=./mozilla-bin
      MOZ_TOOLKIT=
        moz_debug=0
     moz_debugger=
Assertion failure: (offset < reg->hdr.avail), at reg.c:840
Abort (core dumped) 
bin> 
bin> gdb mozilla-bin mozilla-bin.core 
GNU gdb 4.16.1
Copyright 1996 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd2.7"...
Core was generated by `mozilla-bin'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libgkgfx.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libxpcom.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libmozjs.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libjsj.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libplds4.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libplc4.so.1.0...done.
Reading symbols from 
/usr/local/home/mats/mozilla/dist/bin/./libnspr4.so.1.0...done.
Reading symbols from /usr/local/lib/libgtk.so.1.2...done.
Reading symbols from /usr/local/lib/libgdk.so.1.2...done.
Reading symbols from /usr/local/lib/libgmodule.so.1.2...done.
Reading symbols from /usr/local/lib/libglib.so.1.2...done.
Reading symbols from /usr/local/lib/libintl.so.1.0...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6.3...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6.1...done.
Reading symbols from /usr/lib/libutil.so.4.5...done.
Reading symbols from /usr/lib/libm.so.0.1...done.
Reading symbols from /usr/lib/libstdc++.so.30.0...done.
Reading symbols from /usr/lib/libc_r.so.3.0...done.
Reading symbols from /usr/lib/libc.so.25.0...done.
#0  0x40685bc7 in _thread_sys_kill ()
(gdb) bt
#0  0x40685bc7 in _thread_sys_kill ()
#1  0x40685ab4 in abort ()
#2  0x40367bce in PR_Assert (s=0x4022b65d "(offset < reg->hdr.avail)", 
file=0x4022abc5 "reg.c", ln=840) at prlog.c:477
#3  0x4022b717 in nr_ReadDesc (reg=0x3fb00, offset=251089, desc=0xdfbfd3e8) at 
reg.c:840
#4  0x4022caca in nr_ReplaceName (reg=0x3fb00, node=251089, path=0x46014 "", 
bufsize=2048, desc=0xdfbfd3e8)
    at reg.c:1372
#5  0x4022fd1e in NR_RegEnumSubkeys (hReg=0x3d400, key=559, state=0x46818, 
buffer=0x46014 "", bufsize=2048, style=0)
    at reg.c:3446
#6  0x401b3969 in nsRegSubtreeEnumerator::advance (this=0x46000) at 
nsRegistry.cpp:1634
#7  0x401b38f6 in nsRegSubtreeEnumerator::Next (this=0x46000) at 
nsRegistry.cpp:1619
#8  0x401a62a3 in nsNativeComponentLoader::Init (this=0x426c0, aCompMgr=0x3f900, 
aReg=0x3a460)
    at nsNativeComponentLoader.cpp:236
#9  0x4019242c in nsComponentManagerImpl::PlatformInit (this=0x3f900) at 
nsComponentManager.cpp:474
#10 0x4019171a in nsComponentManagerImpl::Init (this=0x3f900) at 
nsComponentManager.cpp:326
#11 0x400ce78e in NS_InitXPCOM2 (productName=0x0, result=0x0, binDirectory=0x0) 
at nsXPComInit.cpp:281
#12 0x400cdb75 in NS_InitXPCOM (result=0x0, binDirectory=0x0) at 
nsXPComInit.cpp:200
qui#13 0x7249 in main (argc=1, argv=0xdfbfd918) at nsAppRunner.cpp:1193
(gdb) quit
Assignee: asa → cls
Component: Browser-General → Build Config
QA Contact: doronr → granrose
updating component.
Keywords: crash
Downloaded Mozilla 0.6 src tarball. configure/gmake without any args. Platform
is OpenBSD-2.8/i386; compiler: gcc 2.95.3

Crash on startup for viewer:
[...]
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
Unable to instantiate Cookie Manager
Going to create the event queue
###!!! ASSERTION: NS_ENSURE_TRUE(mWindow) failed: 'mWindow', file
nsBrowserWindow.cpp, line 388
###!!! Break: at file nsBrowserWindow.cpp, line 388
Memory fault (core dumped)


Crash on startup for mozilla-bin:

Assertion failure: (offset < reg->hdr.avail), at reg.c:1538
Abort (core dumped)


Here is the gdb stack trace:
(gdb)
#0  0x40498937 in _thread_sys_kill ()
#1  0x40498824 in abort ()
#2  0x4037bbce in PR_Assert (s=0x40233af5 "(offset < reg->hdr.avail)",
file=0x4023305d "reg.c", ln=1538) at prlog.c:477
#3  0x402352db in nr_FindAtLevel (reg=0x40b00, offset=66022, pName=0x4019247a
"LastModTimeStamp", pDesc=0xdfbfd39c, pOffPrev=0x0)
    at reg.c:1538
#4  0x402376fb in NR_RegGetEntry (hReg=0x3e400, key=65864, name=0x4019247a
"LastModTimeStamp", buffer=0xdfbfd460,
    size=0xdfbfd400) at reg.c:2997
#5  0x401b3fe5 in nsRegistry::GetLongLong (this=0x3b460, baseKey=65864,
path=0x4019247a "LastModTimeStamp", result=0xdfbfd460)
    at nsRegistry.cpp:958
#6  0x401aa6b6 in nsNativeComponentLoader::GetRegistryDllInfo (this=0x436c0,
key=65864, lastModifiedTime=0xdfbfd540,
    fileSize=0xdfbfd538) at nsNativeComponentLoader.cpp:1025
#7  0x401a78d0 in nsNativeComponentLoader::Init (this=0x436c0, aCompMgr=0x40900,
aReg=0x3b460) at nsNativeComponentLoader.cpp:229
#8  0x40193b34 in nsComponentManagerImpl::PlatformInit (this=0x40900) at
nsComponentManager.cpp:474
#9  0x40192e22 in nsComponentManagerImpl::Init (this=0x40900) at
nsComponentManager.cpp:326
#10 0x400cf7ce in NS_InitXPCOM2 (productName=0x0, result=0x0, binDirectory=0x0)
at nsXPComInit.cpp:283
#11 0x400ceb75 in NS_InitXPCOM (result=0x0, binDirectory=0x0) at nsXPComInit.cpp:202
#12 0x76c9 in main (argc=1, argv=0xdfbfd90c) at nsAppRunner.cpp:1244
(gdb) q
FYI, I'm seeing this precise same crash when I try to use mozilla built with the current development gcc compiler (gcc.gnu.org), what is due to become the gcc 3.0 release (at some point hopefully sooner than later).  

This is NOT specific to OpenBSD.

I'm glad to see that someone else has encountered it---that tells me that it's not necessarily a bug in the code generated by this compiler, but may well instead be a problem being tickled by some assumption made in mozilla's code.

I've encountered this bug on a system running RedHat 6.1, one running 6.2, and then one with a bunch of changes that bring it closer to RedHat 7.0.  There are no peculiar options given to the gcc configure script (just `./configure' then `make bootstrap').  It's happened consistently for a few months for me.  I've made little progress, even after sinking a lot of time trying to find the cause of the problem.


The bits in my .mozconfig are:

ac_add_options --disable-mailnews
ac_add_options --enable-debug
ac_add_options --disable-tests
ac_add_options --disable-pedantic
ac_add_options --with-jpeg=/usr
ac_add_options --with-zlib=/usr
ac_add_options --with-png=/usr
ac_add_options --with-mng=/usr
ac_add_options --disable-dtd-debug
ac_add_options --enable-nspr-autoconf
ac_add_options --disable-logging

I'm building it with

(make -f client.mk build BUILD_MODULES=psm ; make -f client.mk build) 2>&1 |tee log

I know that mozilla will absolutely fly with the new gcc, if it can just manage to build and run well. :)  (I've filed a couple of other reports with some of the tweaks I had to make to the code to make it legal C++ and thus be accepted by the newer g++.)

Hope to hear from you,
Brendan
Setting milestones to Future.
Target Milestone: --- → Future
Reporter, does this problem still occur with latest nightly build or current
mozilla release ?
According to what is said on the OpenBSD Mailinglist, this Problem still occurs
with 0.98 on OpenBSD 3.0. This is all I know (I'm not the Reporter)

*** This bug has been marked as a duplicate of 124958 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
verified dup.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.