[asterisk-bugs] [Asterisk 0018240]: [patch] VoicemailMain Exits Without Warning

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Nov 11 21:14:04 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18240 
====================================================================== 
Reported By:                leobrown
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18240
Category:                   Applications/app_voicemail
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
JIRA:                       SWP-2496 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-11-02 06:46 CDT
Last Modified:              2010-11-11 21:14 CST
====================================================================== 
Summary:                    [patch] VoicemailMain Exits Without Warning
Description: 
Hi

I've seen problems with VoicemailMain crashing in the past, from not being
able to lock paths, open audio files etc.

However, I have a VoiceMailMain which is opening a mailbox, but existing
after verifying a correct password.

The console trace is below, but because Asterisk is not crashing, I can
not provide a backtrace. Could you please give me some guidance on how to
further debug, as debug level 10 (shown below) only shows it
locking/unlocking paths and then exiting.

I have checked all permissions and even removed mailboxes and let Asterisk
create the paths itself. Voicemail() works fine, but VoicemailMain does
not. The relevant entry from voicemail.conf is also

Leo
====================================================================== 

---------------------------------------------------------------------- 
 (0128816) elguero (reporter) - 2010-11-11 21:14
 https://issues.asterisk.org/view.php?id=18240#c128816 
---------------------------------------------------------------------- 
alecdavis:
You are correct, I copied the filename in jpeeler's note but I actually
applied the second one as you already noted.

What part of the code are you talking about in regards to the if < -1? 
The different code paths depending on the backend does seem to get
confusing.

Inside open_mailbox function I understand the following:

count_messages will return:
    -100 if there is a locking error (filesystem path)
    0 or greater (filesystem path)

    0 or greater (odbc path)

last_message_index will only return:
    0 or greater than for index (1 or more messages)
    -1 to indicate no index (no message) 
    filesystem path - appears that -1 returned when there is an error with
opendir() but it will just be treated the same as not having an index
instead of determining locking error because that function should only be
called once a lock has already been set.  So, I am not sure if that should
be changed or not since the locking should have already been handled.

At least this is how I am understanding it.  So, I think your second patch
was the correct fix if what we are checking for is locking errors for the
filesystem storage path and exiting. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-11-11 21:14 elguero        Note Added: 0128816                          
======================================================================




More information about the asterisk-bugs mailing list