[Home]

Summary:ASTERISK-13609: [patch] Usage of IMAP mailboxes still cause asterisk to crash, even after 0013653 committed patch
Reporter:Tiziano Martelli (tiziano)Labels:
Date Opened:2009-02-19 11:16:36.000-0600Date Closed:2009-05-12 15:42:33
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail/IMAP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090221_2_wrongmailbox.diff.txt
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
Comments:By: Tilghman Lesher (tilghman) 2009-02-19 16:00:38.000-0600

If you're reporting a crash, I need to see a backtrace, as documented in doc/backtrace.txt.

Also, it would probably help if you applied the patch from ASTERISK-13368 as well, as that fixes a crash within IMAP support, but is not yet committed.

By: Tiziano Martelli (tiziano) 2009-02-21 05:17:56.000-0600

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 leave 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 your, that adds two checks to the code if the mailbox entered is invalid: go to "out" label BEFORE your mentioned code and, in the "out" section, check vmu validity before launching vmstate_delete. Hope this help



By: Jeff Phelps (blargman) 2009-04-03 15:46:36

tiziano: can you post a copy of your voicemail.conf and sip.conf files...  I would like to see something that may relate this to a bug I reported...

By: Digium Subversion (svnbot) 2009-05-12 15:39:26

Repository: asterisk
Revision: 193955

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r193955 | tilghman | 2009-05-12 15:39:25 -0500 (Tue, 12 May 2009) | 6 lines

Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
(closes issue ASTERISK-13609)
Reported by: tiziano
Patches:
      20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193955

By: Digium Subversion (svnbot) 2009-05-12 15:40:27

Repository: asterisk
Revision: 193956

_U  trunk/
U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r193956 | tilghman | 2009-05-12 15:40:27 -0500 (Tue, 12 May 2009) | 13 lines

Merged revisions 193955 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines
 
 Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
 (closes issue ASTERISK-13609)
  Reported by: tiziano
  Patches:
        20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193956

By: Digium Subversion (svnbot) 2009-05-12 15:42:13

Repository: asterisk
Revision: 193957

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_voicemail.c

------------------------------------------------------------------------
r193957 | tilghman | 2009-05-12 15:42:13 -0500 (Tue, 12 May 2009) | 20 lines

Merged revisions 193956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r193956 | tilghman | 2009-05-12 15:40:22 -0500 (Tue, 12 May 2009) | 13 lines
 
 Merged revisions 193955 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines
   
   Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
   (closes issue ASTERISK-13609)
    Reported by: tiziano
    Patches:
          20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193957

By: Digium Subversion (svnbot) 2009-05-12 15:42:21

Repository: asterisk
Revision: 193958

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_voicemail.c

------------------------------------------------------------------------
r193958 | tilghman | 2009-05-12 15:42:21 -0500 (Tue, 12 May 2009) | 20 lines

Merged revisions 193956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r193956 | tilghman | 2009-05-12 15:40:22 -0500 (Tue, 12 May 2009) | 13 lines
 
 Merged revisions 193955 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines
   
   Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
   (closes issue ASTERISK-13609)
    Reported by: tiziano
    Patches:
          20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193958

By: Digium Subversion (svnbot) 2009-05-12 15:42:33

Repository: asterisk
Revision: 193959

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_voicemail.c

------------------------------------------------------------------------
r193959 | tilghman | 2009-05-12 15:42:32 -0500 (Tue, 12 May 2009) | 20 lines

Merged revisions 193956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r193956 | tilghman | 2009-05-12 15:40:22 -0500 (Tue, 12 May 2009) | 13 lines
 
 Merged revisions 193955 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r193955 | tilghman | 2009-05-12 15:39:21 -0500 (Tue, 12 May 2009) | 6 lines
   
   Avoid initializing routines if the authentication fails.  Fixes a crash (RR) issue.
   (closes issue ASTERISK-13609)
    Reported by: tiziano
    Patches:
          20090221_2_wrongmailbox.diff.txt uploaded by tiziano (license 377)
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=193959