[Home]

Summary:ASTERISK-16645: [patch] Mutex 'dialog' freed more times than we've locked ! and Error releasing mutex.
Reporter:Barry GATEFAIT (bwg)Labels:
Date Opened:2010-09-02 23:32:45Date Closed:2010-11-05 17:17:23
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) full.log
( 1) gdb.12oct10
( 2) gdb.txt
( 3) issue17949_101004__sip_dialog_freed_too_often.diff
( 4) locks.log
( 5) log.12oct10
Description:Hi,

Have a system (asterisk) crash several times a day that causes all communications to halt abruptly and prevents any new call to go through.

Cheers,

****** ADDITIONAL INFORMATION ******

[Sep  3 14:55:08] ERROR[10930] lock.c: chan_sip.c line 9065 (add_header_max_forwards): mutex 'dialog' freed more times than we've locked!

[Sep  3 14:55:08] ERROR[10930] lock.c: chan_sip.c line 9065 (add_header_max_forwards): Error releasing mutex: Operation not permitted
Comments:By: Barry GATEFAIT (bwg) 2010-09-02 23:37:45

Have attached full.log, gdb.txt and locks.log

As running Valgrind causes considerable audio degradation, we are unable to produce a trace.

By: Brett Bryant (bbryant) 2010-10-04 15:23:43

bwg, please apply the patch attached, which is designed to stop it from crashing during this error and recover, and report back to me the results.

By: Barry GATEFAIT (bwg) 2010-10-12 17:21:42

Hi bbryant,

The patch has solved the mutex pb. as  the system run for a week witout a single crash. However after that week, the system did crash with another mutex :

[Oct 12 08:21:10] ERROR[18293] lock.c: chan_dahdi.c line 2053 (my_unlock_private): mutex '&p->lock' freed more times than we've locked!
[Oct 12 08:21:10] ERROR[18293] lock.c: chan_dahdi.c line 2053 (my_unlock_private): Error releasing mutex: Operation not permitted

This pb is scarce but still annoying. Have attached gdb and log files.

Cheers,

By: Barry GATEFAIT (bwg) 2010-11-04 16:10:01

Hi BBriant,

Thanks for your concern. We've given up SVN trunk 283596 and gone to Asterisk 1.6.2.9-2 and found it to be stable.

Have a good day,

Barry G.

By: Digium Subversion (svnbot) 2010-11-05 17:03:12

Repository: asterisk
Revision: 294084

U   branches/1.8/channels/chan_sip.c

------------------------------------------------------------------------
r294084 | bbryant | 2010-11-05 17:03:12 -0500 (Fri, 05 Nov 2010) | 9 lines

Fixed deadlock avoidance issues while locking channel when adding the
Max-Forwards header to a request.

(closes issue ASTERISK-16645)
(closes issue ASTERISK-16861)
Reported by: bwg

Review: https://reviewboard.asterisk.org/r/997/

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

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

By: Digium Subversion (svnbot) 2010-11-05 17:17:22

Repository: asterisk
Revision: 294086

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r294086 | bbryant | 2010-11-05 17:17:22 -0500 (Fri, 05 Nov 2010) | 16 lines

Merged revisions 294084 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r294084 | bbryant | 2010-11-05 18:03:11 -0400 (Fri, 05 Nov 2010) | 9 lines
 
 Fixed deadlock avoidance issues while locking channel when adding the
 Max-Forwards header to a request.
 
 (closes issue ASTERISK-16645)
 (closes issue ASTERISK-16861)
 Reported by: bwg
 
 Review: https://reviewboard.asterisk.org/r/997/
........

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

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