[Home]

Summary:ASTERISK-18317: Locking problems with unloading/loading chan_dahdi
Reporter:Mark Murawski (kobaz)Labels:
Date Opened:2011-08-22 11:24:56Date Closed:2014-04-11 11:29:51
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:1.8.5.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:demo3*CLI> module load chan_dahdi.so
Loaded chan_dahdi.so
 == Registered application 'DAHDISendKeypadFacility'
 == Registered application 'DAHDISendCallreroutingFacility'
 == Parsing '/etc/asterisk/chan_dahdi.conf':   == Found
   -- Registered channel 1, ISDN PRI signalling
   -- Registered channel 2, ISDN PRI signalling
   -- Registered channel 3, ISDN PRI signalling
   -- Registered channel 4, ISDN PRI signalling
   -- Registered channel 5, ISDN PRI signalling
   -- Registered channel 6, ISDN PRI signalling
   -- Registered channel 7, ISDN PRI signalling
   -- Registered channel 8, ISDN PRI signalling
   -- Registered channel 9, ISDN PRI signalling
   -- Registered channel 10, ISDN PRI signalling
   -- Registered channel 11, ISDN PRI signalling
   -- Registered channel 12, ISDN PRI signalling
   -- Registered channel 13, ISDN PRI signalling
   -- Registered channel 14, ISDN PRI signalling
   -- Registered channel 15, ISDN PRI signalling
   -- Registered channel 16, ISDN PRI signalling
   -- Registered channel 17, ISDN PRI signalling
   -- Registered channel 18, ISDN PRI signalling
   -- Registered channel 19, ISDN PRI signalling
   -- Registered channel 20, ISDN PRI signalling
   -- Registered channel 21, ISDN PRI signalling
   -- Registered channel 22, ISDN PRI signalling
   -- Registered channel 23, ISDN PRI signalling
   -- Registered channel 25, ISDN PRI signalling
   -- Registered channel 26, ISDN PRI signalling
   -- Registered channel 27, ISDN PRI signalling
   -- Registered channel 28, ISDN PRI signalling
   -- Registered channel 29, ISDN PRI signalling
   -- Registered channel 30, ISDN PRI signalling
   -- Registered channel 31, ISDN PRI signalling
   -- Registered channel 32, ISDN PRI signalling
   -- Registered channel 33, ISDN PRI signalling
   -- Registered channel 34, ISDN PRI signalling
   -- Registered channel 35, ISDN PRI signalling
   -- Registered channel 36, ISDN PRI signalling
   -- Registered channel 37, ISDN PRI signalling
   -- Registered channel 38, ISDN PRI signalling
   -- Registered channel 39, ISDN PRI signalling
   -- Registered channel 40, ISDN PRI signalling
   -- Registered channel 41, ISDN PRI signalling
   -- Registered channel 42, ISDN PRI signalling
   -- Registered channel 43, ISDN PRI signalling
   -- Registered channel 44, ISDN PRI signalling
   -- Registered channel 45, ISDN PRI signalling
   -- Registered channel 46, ISDN PRI signalling
   -- Registered channel 47, ISDN PRI signalling
   -- Automatically generated pseudo channel
 == Starting D-Channel on span 1
 == Starting D-Channel on span 2
 == Registered channel type 'DAHDI' (DAHDI Telephony Driver w/PRI)
 == Manager registered action DAHDITransfer
 == Manager registered action DAHDIHangup
 == Manager registered action DAHDIDialOffhook
 == Manager registered action DAHDIDNDon
 == Primary D-Channel on span 1 up
 == Manager registered action DAHDIDNDoff
 == Primary D-Channel on span 2 up
 == Manager registered action DAHDIShowChannels
 == Manager registered action DAHDIRestart
Loaded chan_dahdi.so => (DAHDI Telephony Driver w/PRI)


demo3*CLI> pri show spans
PRI span 1/0: Up, Active
PRI span 2/0: Up, Active



demo3*CLI> module unload chan_dahdi.so
Unloaded chan_dahdi.so
 == Unregistered application 'DAHDISendKeypadFacility'
 == Unregistered application 'DAHDISendCallreroutingFacility'
 == Manager unregistered action DAHDIDialOffhook
 == Manager unregistered action DAHDIHangup
 == Manager unregistered action DAHDITransfer
 == Manager unregistered action DAHDIDNDoff
 == Manager unregistered action DAHDIDNDon
 == Manager unregistered action DAHDIShowChannels
 == Manager unregistered action DAHDIRestart
 == Unregistered channel type 'DAHDI'
   -- Unregistered channel -2
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 1
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 2
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 3
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 4
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 5
[Aug 22 12:24:10] ERROR[8303]: lock.c:280 __ast_pthread_mutex_lock: chan_dahdi.c line 5589 (dahdi_unlink_pri_pvt): Error obtaining mutex: Invalid argument
[Aug 22 12:24:10] ERROR[8303]: lock.c:407 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): mutex '&pri->lock' freed more times than we've locked!
[Aug 22 12:24:10] ERROR[8303]: lock.c:438 __ast_pthread_mutex_unlock: chan_dahdi.c line 5593 (dahdi_unlink_pri_pvt): Error releasing mutex: Invalid argument
   -- Unregistered channel 6
..etc... all the way up to chan 47
Comments:By: Paul Belanger (pabelanger) 2011-08-23 10:26:17.730-0500

Is this a regression?  EG: When did it last work properly?

By: Mark Murawski (kobaz) 2011-08-23 10:37:19.697-0500

Yes, it's a regression.  I've seen this before in a 1.4 or 1.6 version.  I know for sure 1.6.0.26 doesn't have this problem, but that's a big range.  I can try some others.

This is the same asterisk version that I'm seeing moh corruption that I'm pretty sure is attributed to dahdi.

By: Matt Jordan (mjordan) 2012-09-05 08:55:58.784-0500

Hey Mark - is this still a problem?

By: Mark Murawski (kobaz) 2012-09-05 09:07:18.742-0500

That's a good question.  I'll have to dig up a machine that has a pri card in it.

By: Rusty Newton (rnewton) 2012-09-24 11:23:57.587-0500

Mark were you able to test again?

By: Mark Murawski (kobaz) 2012-09-25 13:07:50.030-0500

The test machine I have has a sangoma card and I cannot get the drivers compiled.  Been futzing with it for a week.  Now I'm waiting for sangoma tech support.

By: Mark Murawski (kobaz) 2012-09-27 20:43:04.355-0500

Same thing.  Asterisk 1.8.12.  Dahdi 2.6.0.

I'll try with the latest 1.8.

By: Mark Murawski (kobaz) 2012-09-27 20:52:40.265-0500

Seems fixed in Asterisk SVN-branch-1.8-r373945

By: Shaun Ruffell (sruffell) 2014-04-11 11:29:51.613-0500

Release in 1.8.18.0