Hi,
A few days ago I started testing one of our POE applications with
0.3502 and noticed a sizeable memory leak in the main process. The
application runs for several months at a time in production under
0.3101 with never a hint of memory creep.
After much debugging I remembered that POE::XS::Queue::Array had been
made the preferred implementation and had been installed on our
development server. Removing it clears up the leak, or at least makes
it orders of magnitude less.
Running a simple test like the following seems to illustrate the
same phenomenon:
#!/usr/bin/perl -w
use POE::XS::Queue::Array;
my $q = POE::XS::Queue::Array->new;
# or
#use POE::Queue::Array;
#my $q = POE::Queue::Array->new;
print "inital: \n", `ps -o rss -p $$`;
for (1..1000){
my $id = $q->enqueue($_ % 4, "payload $_");
$q->dequeue_next;
print "$_:\n", `ps -o rss -p $$`;
}
I see the same behaviour on Linux/i386/POE 0.3502/gcc 3.2.3 and
FreeBSD/amd64/POE 0.3501/gcc 3.4.4, both using POE::XS::Queue::Array
0.001. If need I can also provide fairly detailed logging from the
application itslef.
Does this seem right or I am barking up the wrong tree?
- Zach