Skip to main content.
home | support | download

Back to List Archive

Re: SWISH::API::Stat memleak?

From: Peter Karman <peter(at)not-real.peknet.com>
Date: Sun Nov 12 2006 - 22:15:49 GMT
I already replied to Brad offlist, but figured I should also post to the list so 
that the archive shows my test results.

I can't find a memleak in SWISH::API::Stat (or SWISH::API::More) and I think the 
Apache::Leak test is a red herring, similar to that reported here:
http://sourceforge.net/mailarchive/forum.php?thread_id=30881943&forum_id=46296

Here's my test script. I see no mem increase via ps or top:

#!/usr/bin/perl
use strict;
use warnings;

use Devel::Cycle;
use SWISH::API::Stat;

# note: the search index contains the word 'foo'

for (1 .. 100000)
{
     test();
}

sub test
{
     my $swish = SWISH::API::Stat->new;
     find_cycle($swish);

     my $search = $swish->search('foo');
     find_cycle($search);

     my $results = $search->execute;
     find_cycle($results);

     while (my $r = $results->next_result)
     {
         find_cycle($r);
     }
}


Brad Miele scribbled on 11/7/06 4:00 PM:
> Peter,
> 
> after our discussion yesterday, i started to test my modperl stuff to look 
> for memory leaks. While i found none when running my code with SWISH::API, 
> i consistently got 2 when running with SWISH::API::Stat, now this doesn't 
> obviously help my issues of growing apache procs, which i will continue to 
> dig for, but i thought you should know in case there was some sort of 
> issue with SAS.
> 
> here is the Apache::Leak STDERR with apache in -X...
> 
> without SAS:
> http://shanty.ipnstock.com/swish_trace_withOUT_Stat.txt
> 
> with SAS:
> http://shanty.ipnstock.com/swish_trace_with_Stat.txt
> 
> looks like we just found some leaks in the handler of the module, so we 
> are looking at those... yay.
> 
> Brad
> ---------------------
> Brad Miele
> VP Technology
> IPNStock.com
> 866 476 7862 x902
> bmiele@ipnstock.com
> 

-- 
Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
Received on Sun Nov 12 14:16:04 2006