[asterisk-bugs] [Asterisk 0016754]: [patch] Multiple segfaults in leave_voicemail at app_voicemail.c:4451 Asterisk 1.4.29

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Mar 5 08:44:01 CST 2010

A NOTE has been added to this issue. 
Reported By:                aragon
Assigned To:                
Project:                    Asterisk
Issue ID:                   16754
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.29 
JIRA:                       SWP-844 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Date Submitted:             2010-02-02 13:08 CST
Last Modified:              2010-03-05 08:44 CST
Summary:                    [patch] Multiple segfaults in leave_voicemail at
app_voicemail.c:4451 Asterisk 1.4.29
Asterisk 1.4.27 was locking at leave_voicemail and after upgrading to
1.4.29 in a desperate attempt to clear the locking Asterisk 1.4.29 started
segfaulting every 2 or 3 minutes.  I had to downgrade to 1.4.27 to prevent
the segfaults.
Here is the evidence of the lock in the ast CLI
app.c: Failed to lock path
'/var/spool/asterisk/voicemail/customer/3329/INBOX': File exists.
The permissions on this folder look normal.
Under 1.4.27 core show locks was useless, core show channels was useless.
When voicemail directories start locking htop showed CPU utilization at
300 where normal load is about 1 on 1.4.27

Attaching Asterisk CLI history.
Ran 1.4.29 under Valgrind for a few minutes until it crashed so I could
upload valgrind capture.
Uploading gdb file with bt, bt full, thread apply all bt full
I believe that while Asterisk was locked on mailbox leaving a message in
mailbox 3329 caused the segfault.  Other mailboxes display similar locking
symptoms in Asterisk CLI.

Relationships       ID      Summary
related to          0016271 [patch] message limit (maxmsg) can be e...
related to          0016921 [patch] VoiceMail(vmbox at context,s) -&gt...
has duplicate       0016813 Failure of canary
has duplicate       0016854 [regression] Crash in app_voicemail.c i...
related to          0016811 Heavy locking in manager.c results in e...

 (0119021) aragon (reporter) - 2010-03-05 08:44
Tested Asterisk SVN-branch-1.4-r250786

To reproduce the crash I must create a dummy .lock file into INBOX folder.
 This is because the .lock file somehow got written to the INBOX and was
never deleted.

I use feature code *980 to leave a message.

Now when I leave a message in that folder I no longer experience a crash.
I do get the dreaded "Exceptionally long voice queue length..." WARNING
and the message is not saved because Asterisk cannot lock the folder.

[Mar  5 09:26:07] WARNING[30797]: channel.c:946 __ast_queue_frame:
Exceptionally long voice queue length queuing to
Local/6002 at default-local-voicemail-ac8f,2
[Mar  5 09:26:08] WARNING[30831]: app.c:1048 ast_lock_path: Failed to lock
path '/var/spool/asterisk/voicemail/default/6002/INBOX': File exists
    -- <Local/6002 at default-local-voicemail-ac8f,2> Playing 'beep'
(language 'en')
    -- Recording the message
    -- x=0, open writing: 
/var/spool/asterisk/voicemail/default/6002/tmp/k4n7pE format: wav49,
Really destroying SIP dialog
'077d6ef72e28ed814d08cdd744c93772 at' Method: OPTIONS

[Mar  5 09:26:24] WARNING[30831]: app.c:1048 ast_lock_path: Failed to lock
path '/var/spool/asterisk/voicemail/default/6002/INBOX': File exists
[Mar  5 09:26:24] ERROR[30831]: app_voicemail.c:4349 leave_voicemail:
Couldn't lock directory /var/spool/asterisk/voicemail/default/6002/INBOX. 
Voicemail will be lost.

  == Spawn extension (default-super, *980, 5) exited non-zero on
 Extension Changed 6010[default-local] new state Idle for Notify User
[Mar  5 09:26:19] WARNING[30831]: file.c:764 ast_readaudio_callback:
Failed to write frame
    -- <Local/6002 at default-local-voicemail-ac8f,2> Playing 'vm-goodbye'
(language 'en')
Really destroying SIP dialog 'f077f17e-15da597d-cac1a50c at'

Issue History 
Date Modified    Username       Field                    Change               
2010-03-05 08:44 aragon         Note Added: 0119021                          

More information about the asterisk-bugs mailing list