Hello, Bradley,
> Agreed, more testing will need to be done. However, it does appear to be
> some type of interaction caused by Event.pm.
I'd agree that it looks like this, but of course it needs to be investigated. Did
you succeed with Devel::Leak? As I noticed that one of my scripts grew up from 12
MB to about 50 MB, I tried to add traces to your script but they made it hang
completely (no activity after the 2nd or 3rd call of CheckSV() , verified by
truss).
Maybe I'm using Devel::Leak the wrong way? According to its doc, I assumed the
following could provide a first indication:
- snip --
#!/usr/local/bin/perl -w
use strict;
use Event qw(loop unloop);
use Devel::Leak;
my ($buffer, $handle, $c);
my $count=Devel::Leak::NoteSV($handle);
warn "STARTING WITH $count SV's.\n";
open CHILD, "./test2.pl|";
Event->io(fd => \*CHILD,
cb => \&mylog);
$count=Devel::Leak::CheckSV($handle);
warn "LOOP STARTS WITH $count SV's.\n";
Event::loop;
sub mylog
{
$c++;
warn "ENTERING, $c. time.\n\n";
my $now=Devel::Leak::CheckSV($handle);
warn "NOW $now SV's.\n";
warn Dumper($handle);
my ($event) = @_;
my ($fd) = $event->w->fd;
return if eof($fd);
$buffer = <$fd>;
print $buffer;
$now=Devel::Leak::CheckSV();
warn "NOW $now SV's.\n";
}
- snip --
Greetings
Jochen