You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Matt Sergeant <ma...@sergeant.org> on 2001/04/26 15:14:11 UTC

Locating leaked scalars

Doug,

I found a post from you to Mosely a while back saying you'd tell him how
to track down scalar leaks, but I can't find any follow up. Is there a
way to do this that you know of, or is it a matter of firing up purify
(which I don't have, but I hear there's a GNU version) or something?

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Robin Berjon <ro...@knowscape.com>.
At 09:20 27/04/2001 +0100, Matt Sergeant wrote:
>On Thu, 26 Apr 2001, Doug MacEachern wrote:
>> if you give me an idea of whats going on, i might be able to offer a
>> suggestion for your particular case.  i have had success using purify,
>> which requires Perl to be compiled with -DPURIFY, similar with insure++
>> (another commercial tool).  i've never had success with any of the
>> opensource tools.
>
>Rats, well I don't have time nor budget to buy purify right now.

Depending on how long you need it for, note that they do offer a 30 day trial.

_______________________________________________________________________
Robin Berjon <ro...@knowscape.com> -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
-----------------------------------------------------------------------
Designing pages in HTML is like having sex in a bathtub. If you don't know
anything about sex, it won't do you any good to know a lot about bathtubs.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Matt Sergeant <ma...@sergeant.org>.
On Fri, 27 Apr 2001, Stas Bekman wrote:

> On Fri, 27 Apr 2001, Matt Sergeant wrote:
>
> > On Thu, 26 Apr 2001, Doug MacEachern wrote:
>
> > > if you give me an idea of whats going on, i might be able to offer a
> > > suggestion for your particular case.  i have had success using purify,
> > > which requires Perl to be compiled with -DPURIFY, similar with insure++
> > > (another commercial tool).  i've never had success with any of the
> > > opensource tools.
> >
> > Rats, well I don't have time nor budget to buy purify right now.
>
> uhm, may be one of the nice users will borrow it to you, or sub-rent? You
> see if you'd a hammer and I needed it, won't you give it to me for a few
> hours? I don't see any problem for some of the guys to send it to you, if
> you promise to return it back without any scratches. I'm serious.
>
> So folks, if you have this kind of hammer and you don't mind to stay
> without it for a few hours, can you please FedEx it to Matt? All the
> shipment charges are guaranteed to be paid back, by having Matt fix the
> tool and for you to use it happily later on. Thanks so much!

Note that the problem is only with AxKit, not mod_perl, I think (and it
may be a 5.005 bug, I've yet to really test it hard). So let me at least
try the Devel::Peek method of debugging this, and if I'm still stuck I'll
come back here (besides, 1 or 2 scalars leaked per interpreter shut-down
isn't too bad :-)

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Stas Bekman <st...@stason.org>.
On Fri, 27 Apr 2001, Matt Sergeant wrote:

> On Thu, 26 Apr 2001, Doug MacEachern wrote:

> > if you give me an idea of whats going on, i might be able to offer a
> > suggestion for your particular case.  i have had success using purify,
> > which requires Perl to be compiled with -DPURIFY, similar with insure++
> > (another commercial tool).  i've never had success with any of the
> > opensource tools.
>
> Rats, well I don't have time nor budget to buy purify right now.

uhm, may be one of the nice users will borrow it to you, or sub-rent? You
see if you'd a hammer and I needed it, won't you give it to me for a few
hours? I don't see any problem for some of the guys to send it to you, if
you promise to return it back without any scratches. I'm serious.

So folks, if you have this kind of hammer and you don't mind to stay
without it for a few hours, can you please FedEx it to Matt? All the
shipment charges are guaranteed to be paid back, by having Matt fix the
tool and for you to use it happily later on. Thanks so much!

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 27 Apr 2001, Matt Sergeant wrote:

> Yeah I've checked all the refcounts, and everything seems hunky-dory. Is
> there any chance global destruction might be happening before the pool
> cleanup? That is the only other thing I can think of, though I guess I
> haven't fine-tooth combed it yet.

global destruction happens during pool cleanup.  if its happening before
another cleanup that is supposed to SvREFCNT_dec and sv, that could be the
problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Matt Sergeant <ma...@sergeant.org>.
On Fri, 27 Apr 2001, Doug MacEachern wrote:

> if you getting 'scalars leaked' during 'global destruction', normally
> means a new{SAV} was created by an xs module and not mortalized or has a
> refcnt too high, e.g. newRV(newAV()), should be newRV_noinc(newAV())

Yeah I've checked all the refcounts, and everything seems hunky-dory. Is
there any chance global destruction might be happening before the pool
cleanup? That is the only other thing I can think of, though I guess I
haven't fine-tooth combed it yet.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Doug MacEachern <do...@covalent.net>.
if you getting 'scalars leaked' during 'global destruction', normally
means a new{SAV} was created by an xs module and not mortalized or has a
refcnt too high, e.g. newRV(newAV()), should be newRV_noinc(newAV())




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Matt Sergeant <ma...@sergeant.org>.
On Thu, 26 Apr 2001, Doug MacEachern wrote:

> On Thu, 26 Apr 2001, Matt Sergeant wrote:
> 
> > Doug,
> > 
> > I found a post from you to Mosely a while back saying you'd tell him how
> > to track down scalar leaks, but I can't find any follow up. Is there a
> > way to do this that you know of, or is it a matter of firing up purify
> > (which I don't have, but I hear there's a GNU version) or something?
> 
> url for that post?  there's no single way to track down a scalar leak.

http://www.bitmechanic.com/mail-archives/modperl/Mar1998/0263.html

If there's no single way, then I'll just go through with Devel::Peek
again. No worries.

> if you give me an idea of whats going on, i might be able to offer a
> suggestion for your particular case.  i have had success using purify,
> which requires Perl to be compiled with -DPURIFY, similar with insure++
> (another commercial tool).  i've never had success with any of the
> opensource tools.

Rats, well I don't have time nor budget to buy purify right now.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Locating leaked scalars

Posted by Doug MacEachern <do...@covalent.net>.
On Thu, 26 Apr 2001, Matt Sergeant wrote:

> Doug,
> 
> I found a post from you to Mosely a while back saying you'd tell him how
> to track down scalar leaks, but I can't find any follow up. Is there a
> way to do this that you know of, or is it a matter of firing up purify
> (which I don't have, but I hear there's a GNU version) or something?

url for that post?  there's no single way to track down a scalar leak.
if you give me an idea of whats going on, i might be able to offer a
suggestion for your particular case.  i have had success using purify,
which requires Perl to be compiled with -DPURIFY, similar with insure++
(another commercial tool).  i've never had success with any of the
opensource tools.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org