develooper Front page | perl.perl5.porters | Postings from October 2001

Debugging SEGV in DBD::SAP_DB

From:
Flemming Frandsen
Date:
October 30, 2001 05:14
Subject:
Debugging SEGV in DBD::SAP_DB
Message ID:
Pine.BSF.4.21.0110301320310.72493-100000@distortion.dk

I'm using the DBD::SAP_DB driver to access a SAP DB database from my
mod_perl application, unfortunatly it sometimes buys my apache a Signal
11.

I know this isn't strictly speaking about perl, but I can't imagine
anywhere else where someone might know what I'm speaking about...

Naturally I think the bug is somewhere in the C part of the driver, the
strange thing is that when the driver SEGV's it's when running the line:
>     eval {$self = tied(%$self);};

This is in DESTROY on a tied hash.


What I'd like to know is, what do these routines do:
* Perl_pp_nextstate
* Perl_free_tmps

It looks as though Perl_pp_rv2hv discovers that something is wrong (indeed
there is, this is the second time DESTROY is called, because the hash is
tied to itself) but trying to make a nice die message it get's shot by
the SEGV.

What data does the Perl_die routine access that is likely to be fucked
up by the C driver?

Is there any hints about debugging this that you can give me?

Stacktrace:
> Program received signal SIGSEGV, Segmentation fault.
> 0x812936d in Perl_sv_setsv ()
> (gdb) where
> #0  0x812936d in Perl_sv_setsv ()
> #1  0x811fad4 in Perl_pp_sassign ()
> #2  0x811f6c0 in Perl_runops_standard ()
> #3  0x80e28aa in perl_call_sv ()
> #4  0x80e245d in perl_call_sv ()
> #5  0x81150a1 in Perl_vdie ()
> #6  0x81151cc in Perl_die ()
> #7  0x8120e10 in Perl_pp_rv2hv ()
> #8  0x811f6c0 in Perl_runops_standard ()
> #9  0x80e28aa in perl_call_sv ()
> #10 0x80e2671 in perl_call_sv ()
> #11 0x812a90f in Perl_sv_clear ()
> #12 0x812ae5e in Perl_sv_free ()
> #13 0x812abc4 in Perl_sv_clear ()
> #14 0x812ae5e in Perl_sv_free ()
> #15 0x8117e13 in Perl_mg_free ()
> #16 0x812aa47 in Perl_sv_clear ()
> #17 0x812ae5e in Perl_sv_free ()
> #18 0x813be46 in Perl_free_tmps ()    <--- FREETMPS
> #19 0x811f7cc in Perl_pp_nextstate () 
> #20 0x811f6c0 in Perl_runops_standard ()
> #21 0x80e28aa in perl_call_sv ()
> [... more stuff all the way up to main(), snipped]

I don't expect it matters, but the perl I'm using is 5.6.0 on a SuSE 7.2

-- 
 Regards Flemming Frandsen aka. Dion/Swamp http://dion.swamp.dk





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About