[asterisk-bugs] [Asterisk 0013671]: asterisk random crashes: IMAP toolkit crash: Unlock when not locked

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 20 14:41:01 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13671 
====================================================================== 
Reported By:                Perry The Cynic
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13671
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            random
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.22 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-10 18:33 CDT
Last Modified:              2008-10-20 14:41 CDT
====================================================================== 
Summary:                    asterisk random crashes: IMAP toolkit crash: Unlock
when not locked
Description: 
Asterisk crashes randomly. The system log always contains this message:

Oct 10 13:23:47 hermod asterisk: IMAP toolkit crash: Unlock when not
locked

Needless to say, this makes my wife very unhappy. :)

Asterisk-1.4.22 with zaptel-1.4.12.1. No local hacks.
Debian GNU/Linux 4.0 (fully updated); Linux kernel 2.6.21.5 (custom); on a
custom VIA Esther-based mini-box.
IMAP server is Mac OS X Server 10.5.5 (Cyrus IMAP).

Please let me know what else I should be providing. This IMAP library
error supposedly indicates a re-entry of threading bug in the caller, which
in this case would be asterisk...

====================================================================== 

---------------------------------------------------------------------- 
 (0093998) putnopvut (administrator) - 2008-10-20 14:41
 http://bugs.digium.com/view.php?id=13671#c93998 
---------------------------------------------------------------------- 
Thanks for all your hard work in trying to locate the issue here. I will
attempt a reproduction of the long message test as I don't think I've ever
done that when testing IMAP voicemail features.

In one of your notes, you mentioned about making calls to c-client library
functions from within callbacks. I've made the mistake of trying that
locally, but that actually usually gives the "lock when already locked"
error instead of the "unlock when not locked" error. The reason is that the
c-client in both cases calls mail_lock() as part of the library call and
does not use recursive mutexes, which leads to a crash.

There's another issue open right now regarding IMAP storage, issue
http://bugs.digium.com/view.php?id=13653.
In it, the reporter suggests using mutex locks around all calls to the
c-client mail_* calls. If you wouldn't mind trying it, the second patch
attached to that issue adds these locks. If you wouldn't mind, I would be
very interested in hearing test results from trying this patch out. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-20 14:41 putnopvut      Note Added: 0093998                          
======================================================================




More information about the asterisk-bugs mailing list