Skip Menu |

This queue is for tickets about the Asterisk-AMI CPAN distribution.

Report information
The Basics
Id: 65782
Status: resolved
Priority: 0/
Queue: Asterisk-AMI

People
Owner: GREENBEAN [...] cpan.org
Requestors: lagutas [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: v0.2.4
Fixed in: v0.2.5

Attachments


Subject: Deep recursion on subroutine
If the connection with the asterisk is dropped, the module consumes all available memory, an error: Deep recursion on subroutine "Asterisk::AMI::_on_error" at /usr/lib64/perl5/site_perl/5.12.2/Asterisk/AMI.pm line 925. Deep recursion on subroutine "Asterisk::AMI:estroy" at /usr/lib64/perl5/site_perl/5.12.2/Asterisk/AMI.pm line 847. Deep recursion on subroutine "Asterisk::AMI:ESTROY" at /usr/lib64/perl5/site_perl/5.12.2/Asterisk/AMI.pm line 1587. Deep recursion on subroutine "Asterisk::AMI::send_action" at /usr/lib64/perl5/site_perl/5.12.2/Asterisk/AMI.pm line 1605. Deep recursion on subroutine "AnyEvent::Handle:ush_write" at /usr/lib64/perl5/site_perl/5.12.2/Asterisk/AMI.pm line 1215. this can be corrected if the sub DESTROY change #Logoff if ($self->{LOGGEDIN}) { $self->send_action({ Action => 'Logoff' }); undef $self->{LOGGEDIN}; } on #Logoff if ($self->{LOGGEDIN}) { undef $self->{LOGGEDIN}; $self->send_action({ Action => 'Logoff' }); } that is, free $self->{LOGGEDIN} before calling the subroutine $self- Show quoted text
>send_action, otherwise the program loops and leads to crash the server
Thank you for the bug report. I uploaded a version that should fix this on git hub. If you can, please go to the link below and try the new version to see if it fixes the issue for you. https://github.com/rrb3942/perl-Asterisk-AMI/tree/0.2.5 The fix I implemented was to check for an error before trying to log off in the destructor (and to log the error before trying to destory). I am unable to test it on my machine right now so if you can test the fix it would be very helpful. Thanks.
I just realized I can attach files here! Here is the updated version that should fix the issue, can you please install it and see if it works. Thanks.
Subject: rrb3942-perl-Asterisk-AMI-a5a9163.tar.gz

Message body not shown because it is not plain text.

From: lagutas [...] gmail.com
Срд Фев 16 20:42:18 2011, GREENBEAN писал: Show quoted text
> I just realized I can attach files here! > > Here is the updated version that should fix the issue, can you please > install it and see if it works. > > Thanks.
Yes, this version works. Problems do not watch. Thanks. ьъ
Fixed version uploaded to CPAN. Ticket will be resolved once it is processed and synced.