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

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 13 15:14:06 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:                     new
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-13 15:14 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...

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

---------------------------------------------------------------------- 
 (0093562) putnopvut (administrator) - 2008-10-13 15:14
 http://bugs.digium.com/view.php?id=13671#c93562 
---------------------------------------------------------------------- 
This is a tricky issue to try to solve, from Asterisk's standpoint, mainly
because I'm not convinced that it is an actual issue in Asterisk. The
problem here is that the UW IMAP c-client is attempting to unlock a mutex
which it thinks is locked. It isn't the responsibility of the application
to lock this lock prior to making library calls to the c-client. In fact,
if I were to add a mail_lock() call prior to most c-client library
functions, the opposite problem would occur ("lock when already locked")
when the c-client would attempt to recursively lock the mutex.

You mention in the description that "This IMAP library error supposedly
indicates a re-entry of threading bug in the caller, which in this case
would be asterisk.." I'm just curious where you read this since I've been
hearing complaints about this for a while and would really like it if there
were something that could be done in Asterisk to fix it.

Also, as kc0bvu pointed out, a backtrace of the crash may be helpful.
Instructions for getting a backtrace may be found in doc/backtrace.txt in
the Asterisk source directory. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-13 15:14 putnopvut      Note Added: 0093562                          
======================================================================




More information about the asterisk-bugs mailing list