Re: session not stopping

Andrew Feren <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
What version of POE are you running?  I gather from your other email 
that you are running on Win32.

Having the app work for a minute or so and then hang sounds suspiciously 
like
https://rt.cpan.org/Ticket/Display.html?id=49379

-Andrew

Andreas Altergott wrote:
> Hi,
>
> my session is behaving strange here.  If it was running for a short
> amount of time (a few minutes), then it terminates perfectly.  After
> running for about 5 minutes though, it won't terminate after sending a
> SIGINT to it.
>
> The sigint handler removes all alarms (delays) that have been set.
> Posts and yields should not be cleared.  They should be processed and
> then the session should terminate.  I did not set any extra references,
> aliases or open files.
>
> The application consists of two main loops that get executed by a delay
> timer.  It also uses POE::Compononent::Win32::ChangeNotify, if this is
> relevant.  It gets shut down though, when the sigint arrives.
>
> The strange thing is that if this /delay-loop/ gets executed probably a
> few hundred times, then the session terminates after a sigint.  If it
> was running much longer, then it does not terminate.
>
> I was reading this FAQ
> <http://poe.perl.org/?POE_FAQ/Why_do_my_sessions_not_stop_on_their_own>
> and added a trace refcount.  This is the output after a sigint, if it is
> not terminating.
>
> <rc> ... at C:/Perl/site/lib/POE/Kernel.pm line 622
> <rc> ,----- Kernel Activity -----
> <rc> | Events : 1
> <rc> | Files  : 0
> <rc> | Extra  : 1
> <rc> | Procs  : 1
> <rc> `---------------------------
> <rc> ... at C:/Perl/site/lib/POE/Kernel.pm line 622
> <rc> decrementing refcount for session thinkpad-4ac26c410000066c
> (POE::Kernel=AR
> RAY(0x1b67364)) at C:/Perl/site/lib/POE/Resource/Sessions.pm line 331
> <rc> decrementing refcount for session thinkpad-4ac26c410000066c
> (POE::Kernel=AR
> RAY(0x1b67364)) at C:/Perl/site/lib/POE/Resource/Sessions.pm line 331
> <rc> incrementing refcount for session thinkpad-4ac26c410000066c
> (POE::Kernel=AR
> RAY(0x1b67364)) at C:/Perl/site/lib/POE/Resource/Sessions.pm line 358
> <rc> incrementing refcount for session thinkpad-4ac26c410000066c
> (POE::Kernel=AR
> RAY(0x1b67364)) at C:/Perl/site/lib/POE/Resource/Sessions.pm line 358
> <rc> ,----- Kernel Activity -----
> <rc> | Events : 1
> <rc> | Files  : 0
> <rc> | Extra  : 1
> <rc> | Procs  : 1
> <rc> `---------------------------
> <rc> ... at C:/Perl/site/lib/POE/Kernel.pm line 622
>
> How can I find out what actually keeps the session alive?
>
> I see that there's one event, one extra and one process.  Is there a
> more detailed list anywhere?
>
>
> Thanks,
> Andreas
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.