[asterisk-bugs] [Asterisk 0014508]: [patch] Usage of IMAP mailboxes still cause asterisk to crash, even after 0013653 committed patch

Asterisk Bug Tracker noreply at bugs.digium.com
Sat Feb 21 05:17:57 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14508 
====================================================================== 
Reported By:                tiziano
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14508
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.23 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-02-19 11:16 CST
Last Modified:              2009-02-21 05:17 CST
====================================================================== 
Summary:                    [patch] Usage of IMAP mailboxes still cause asterisk
to crash, even after 0013653 committed patch
Description: 
I've tried to add my experience to existing 0013653 issue, but I wasn't
able to add any note (I think it's because it has "closed" status). Anyway,
I'm getting this issue from more that 1 year, I've upgraded * and the IMAP
library lot of times but always got the same result: randomly (about 1 time
a day) * crashes after some operations on IMAP storage (could be messages
leaved from outside or people working on their mailbox). I've been very
happy when I've seen the patch, so I've upgraded * to 1.4.23 (IMAP was
already at 2007e) but the problem hasn't solved. For this reason, I want to
add my peculiarity: all my peers are IP phones that access their mailboxes
thought the phones and have "mailbox=...." declared in their PEER
configuration to light MWI phone led. So, I've have no shared mailboxes,
but all the mailboxes are (I think) always locked: doing a "ps" I see an
"imapd" process for every peer. Don't know it this will be useful to find a
solution, I just think that it's not enough to add ast_mutex calls in
app_voicemail, you probably must add them also where "SIP mailbox" live.
Thanks
====================================================================== 

---------------------------------------------------------------------- 
 (0100495) tiziano (reporter) - 2009-02-21 05:17
 http://bugs.digium.com/view.php?id=14508#c100495 
---------------------------------------------------------------------- 
First of all, thank to Corydon76 for the suggested patch and to Skavin that
pointed out the problem. I think that this, together with the locking
0013653 issue, is the cause of the randomly crashes I've described. I've no
backtrace available because the effect is more often a hung that a real
crash: the "ps" show an asterisk process running but, if I launch a client
(i.e. asterisk -r) I got the same messages as if there is no asterisk
running at all (Unable to connect to remote asterisk (does
/var/run/asterisk.ctl exist?)). If you can lease this issue open for a
week, I'll report if the problem has disappeared. In the meantime, I can
contribute - if you think is useful - with a patch to an error I founded
yesterday while exploring patch logic. If a dialplan let you enter
VoiceMailMain for an unexisting mailbox, app_voicemail let you go through
the code you entered after #ifdef IMAP_STORAGE in vm_execmain function,
crashing asterisk because vmu pointer is null. I've attached a patch, that
must be applied after yours, that adds three checks to the code if the
mailbox entered is invalid: don't launch vm_authenticate, go to "out" label
BEFORE your mentioned code and, in the "out" section, check vmu validity
before launching vmstate_delete. Hope this help 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-21 05:17 tiziano        Note Added: 0100495                          
======================================================================




More information about the asterisk-bugs mailing list