[Pdx-pm] Strange Random coredumps

Mark Hartley mark at drapple.com
Thu Dec 19 15:57:44 CST 2002


On Thu, Dec 19, 2002 at 01:37:57PM -0800, Joshua Keroes wrote:
> On (Thu, Dec 19 12:35), Mark Hartley wrote:
> > I am having a very frustrating problem with a few Perl apps
> > I've written randomly dumping core, and I'm hoping someone can
> > point me in a direction to find the cause.
> > 
> > A little background as to what I'm doing:
> > I have a whole bunch of applications that I've written which run
> > as a CGI under Apache (1.3.26) on a FreeBSD (4.6.2-RELEASE-p4) machine.
> > There are actually 3 of these machines, one of which is running SSL.
> > All 3 machines are using Perl 5.005_03.
> > 
> > The applications are talking to a MS SQL server 2000 database (not by
> > my choice).  I am using DBI:Sybase drivers to talk to the db.  I know
> > that I could use ODBC drivers as well, but right now I'm using the
> > Sybase ones.
> 
> What version of Perl, what DBI version, what DBD::Sybase version?
> Are the coredumps written to user apache's home directory (or
> somewhere else?
> 

Perl 5.005_03
DBD::Sybase version 0.91
DBI version 1.20 

There is a newer version of DBD::Sybase out, but 0.91 is the most recent
version that will work on FreeBSD to talk to a SQL server 2000 database.
(As far as I can tell).

> You're going to want a coredump for these. Since the Perl debugger
> isn't helping, this is most likely the only way to tell where the
> culprit really is.
> 
> If you can't find a coredump, change your CGI/apache user's shell
> options to allow coredumps, make it break again, open the core file with
> gdb and get a backtrace (bt). You may have to recompile perl or the
> DVD::Sybase module with -g (-DDEBUGGING) to get a useful backtrace.
> 


I'm not acutally getting the core files, but I know it is dumping core.
I have a couple of command line utilities (talking to the same db) that
periodically dump core along similar lines as the CGI apps.  I do get
the core files for those, but I'm not sure what to do with those core
files.


I did what you mention with one of the core files from one of my command
line utils.  Here is what I got (this doesn't really mean much to me):

(gdb) bt
#0  0x281e93d8 in XS_DBI_dispatch () from /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/DBI/DBI.so
#1  0x280b5ff6 in Perl_pp_entersub () from /usr/lib/libperl.so.3
#2  0x280e9696 in perl_call_sv () from /usr/lib/libperl.so.3
#3  0x280ad9e0 in Perl_sv_clear () from /usr/lib/libperl.so.3
#4  0x280adeb1 in Perl_sv_free () from /usr/lib/libperl.so.3
#5  0x2809ab5b in Perl_free_tmps () from /usr/lib/libperl.so.3
#6  0x280b1070 in Perl_pp_nextstate () from /usr/lib/libperl.so.3
#7  0x2807f11d in Perl_runops_standard () from /usr/lib/libperl.so.3
#8  0x280e8ef0 in perl_run () from /usr/lib/libperl.so.3
#9  0x8048e75 in main ()
#10 0x8048d61 in _start ()
(gdb) 


Mark.



More information about the Pdx-pm-list mailing list