Subject: Re: 4.99.38 alpha: applications dumping core
To: Andrew Doran <ad@netbsd.org>
From: mel kravitz <melk@switchpwr.com>
List: current-users
Date: 12/07/2007 06:05:18
Yes, firefox is a script, not a good example to take, returning to 
4.99.33 with my kde_cores,
i can examine the core files on a 'working system'. I get an indication 
that stack corrupted-
casey229: {5} gdb dcop dcop.core
GNU gdb 6.5
Copyright (C) 2006 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 "alpha--netbsd"...(no debugging symbols found)


warning: .dynamic section for "/usr/lib/libz.so.1" is not at the 
expected address

warning: .dynamic section for "/usr/lib/libpthread.so.0" is not at the 
expected address

warning: .dynamic section for "/usr/lib/libc.so.12" is not at the 
expected address

warning: .dynamic section for "/usr/libexec/ld.elf_so" is not at the 
expected address
Reading symbols from /usr/pkg/lib/libDCOP.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/pkg/lib/libDCOP.so.4
Reading symbols from /usr/pkg/qt3/lib/libqt-mt.so.3...(no debugging 
symbols found)...done.
Loaded symbols for /usr/pkg/qt3/lib/libqt-mt.so.3
Reading symbols from /usr/pkg/lib/libGL.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libGL.so.1
Reading symbols from /usr/X11R6/lib/libXmu.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/X11R6/lib/libXmu.so.6
Reading symbols from /usr/pkg/lib/libXrandr.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libXrandr.so.2
Reading symbols from /usr/pkg/lib/libXcursor.so.1...(no debugging 
symbols found)...done.
Loaded symbols for /usr/pkg/lib/libXcursor.so.1
Reading symbols from /usr/pkg/lib/libXfixes.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libXfixes.so.0
Reading symbols from /usr/X11R6/lib/libXinerama.so.1...(no debugging 
symbols found)...done.
Loaded symbols for /usr/X11R6/lib/libXinerama.so.1
Reading symbols from /usr/pkg/lib/libXft.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libXft.so.2
Reading symbols from /usr/pkg/lib/libXrender.so.1...(no debugging 
symbols found)...done.
Loaded symbols for /usr/pkg/lib/libXrender.so.1
Reading symbols from /usr/pkg/lib/libfontconfig.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libfontconfig.so.1
Reading symbols from /usr/pkg/lib/libfreetype.so.6...(no debugging 
symbols found)...done.
Loaded symbols for /usr/pkg/lib/libfreetype.so.6
Reading symbols from /usr/pkg/lib/libexpat.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/pkg/lib/libexpat.so.1
Reading symbols from /usr/pkg/lib/libpng12.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/pkg/lib/libpng12.so.0
Reading symbols from /usr/lib/libz.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/X11R6/lib/libXext.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...
(no debugging symbols found)...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /usr/pkg/lib/libSM.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/pkg/lib/libSM.so.6
Reading symbols from /usr/X11R6/lib/libICE.so.6...
(no debugging symbols found)...done.
Loaded symbols for /usr/X11R6/lib/libICE.so.6
Reading symbols from /usr/lib/libpthread.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libpthread.so.0
Reading symbols from /usr/lib/libstdc++.so.6...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/libm.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libm.so.0
Reading symbols from /usr/lib/libgcc_s.so.1...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/X11R6/lib/libXt.so.6...
(no debugging symbols found)...done.
Loaded symbols for /usr/X11R6/lib/libXt.so.6
Reading symbols from /usr/X11R6/lib/libSM.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/X11R6/lib/libSM.so.6
Reading symbols from /usr/lib/libz.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.0
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols 
found)...done.
Loaded symbols for /usr/libexec/ld.elf_so

Core was generated by `dcop'.
---Type <return> to continue, or q <return> to quit---
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000001612b8830 in pthread_mutexattr_init ()
   from /usr/lib/libpthread.so.0
#2  0x000000016147a9d8 in __register_frame_info_bases ()
   from /usr/lib/libgcc_s.so.1
#3  0x000000016148c870 in ?? () from /usr/lib/libgcc_s.so.1
warning: Hit heuristic-fence-post without finding enclosing function for 
address 0x16148c870
This warning occurs if you are debugging a function without any symbols
(for example, in a stripped executable).  In that case, you may wish to
increase the size of the search with the `set heuristic-fence-post' command.

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.
#4  0x000000016148c870 in ?? () from /usr/lib/libgcc_s.so.1
warning: Hit heuristic-fence-post without finding enclosing function for 
address 0x16148c870
Previous frame identical to this frame (corrupt stack?)
(gdb)
-Mel
> Hello,
>
> mel kravitz <melk@switchpwr.com> writes:
>
> > symlinks are present, /usr/lib/libc.so point to new libs defined by 4.99.39,
> > similar for /lib files. I need only install base.tgz from 4.99.39
> > release to examine the problem, in the case of firefox i used gdb to
> > get the following interesting data:
> > casey234: {24} gdb firefox firefox-bin.core
> > GNU gdb 6.5
> > Copyright (C) 2006 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 "alpha--netbsd"..."/usr/pkg/bin/firefox":
> > not in executable format: File format not recognized
>
> /usr/pkg/bin/firefox is (typically/always?) a shell script that sets up
> a few things and then exec /usr/pkg/lib/firefox/firefox-bin, so the
> format is not recognised by gdb.  Is the backtrace (with firefox-bin
> instead of firefox) something like
>
>   ...
>   in pthread_mutex_init()
>   ...
>   from /usr/pkg/lib/libexpat
>   ...
>   previous frame inner to this one (stack corrupted?)
>
> (from memory)?  In that case, there seems to be exactly the same problem on
> powerpc (macppc) -- that is, someone is overwriting something in the
> stack during dynamic linking.
>
> --- Johan
>   

Andrew Doran wrote:
> On Tue, Dec 04, 2007 at 07:19:15AM -0500, mel kravitz wrote:
>   
>> rebuilt release 4.99.39 today, jemalloc.c 1.15, startkde dumps the 
>> following core files on startup and gdb on alpha does not give much data-
>> casey229: {13} cd core_dumps
>> casey229: {14} ls -l *
>> -rw-------  1 mel  users  3130096 Dec  4 06:24 artsshell.core
>> -rw-------  1 mel  users  1516768 Dec  4 06:23 dcop.core
>> -rw-------  1 mel  users  1756816 Dec  4 06:23 kde-config.core
>> -rw-------  1 mel  users  2493752 Dec  4 06:23 kdeinit.core
>> -rw-------  1 mel  users  2179232 Dec  4 06:23 ksmserver.core
>> -rw-------  1 mel  users  2469464 Dec  4 06:23 ksplash.core
>> casey229: {15} gdb -core ksmserver.core
>> GNU gdb 6.5
>> Copyright (C) 2006 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 "alpha--netbsd".
>> Core was generated by `ksmserver'.
>> Program terminated with signal 11, Segmentation fault.
>> #0  0x0000000000000000 in ?? ()
>> moving userland back to 4.99.33 allows kde to start. Any suggestions 
>> welcome-
>> mel
>>     
>
> Are you sure the synlinks under /usr/lib and /lib are correct? There is a problem
> with library load order in the dynamic linker. jemalloc 1.15 works around it for
> x86; I'm working on a real solution. Hopefully it's the cause of this problem.
>
> Thanks,
> Andrew
>
>
>