For Programmers: Free Programming Magazines  


Home > Archive > PERL POE > June 2005 > POE mysteriously exits









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author POE mysteriously exits
Daisuke Maki

2005-06-08, 9:04 pm

Hi all

I'd like some advise on how to debug a POE application (a mid-sized web
crawler) that is seemingly exiting sporadically without displaying any
error conditions. The program runs randomly for 10 minutes ~ 4,5 hours,
and then exists without showing any meaningful error message.

through using TRACE_DEFAULT() and inserting a bunch of print statements,
I've traced this down to circa line 924 of POE::Kernel:

my $return;
if (wantarray) {
$return = [
$session->_invoke_state($source_session, $event, $etc, $file, $line,
$fromstate)
];
}
else {
$return =
$session->_invoke_state($source_session, $event, $etc, $file, $line,
$fromstate);
}

The execution goes into the else cluase, but _invoke_state is never
called!!!

I added debug statements like so in POE::Kernel

my $return;
if (wantarray) {
$return = [
$session->_invoke_state($source_session, $event, $etc, $file, $line,
$fromstate)
];
}
else {
_warn("DEBUG(1): $session, $source_session, $event, $etc, $file, $line,
$fromstate");
$return =
$session->_invoke_state($source_session, $event, $etc, $file, $line,
$fromstate);
_warn("DEBUG(3): _invoke_state done");
}

As well as

sub _invoke_state {
my ($self, $source_session, $event, $etc) = @_;
_warn("DEBUG(2) _invoke_state");

But the execution never reaches DEBUG(2). I'm at a complete loss as to
what to do now. Has anyone hit anything like this?

As far as POE related modules go, I'm using
POE - 0.3009
POE::Component::Client::HTTP - 0.65
POE::Component::Client::DNS - 0.98

Any help is appreciated.

---d


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com