[Home]

Summary:ASTERISK-26204: Locks in chan_sip
Reporter:Leandro Dardini (ldardini)Labels:
Date Opened:2016-07-16 02:53:45Date Closed:2016-07-16 04:32:51
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:13.10.0 Frequency of
Occurrence
Constant
Related
Issues:
duplicatesASTERISK-25468 Deadlock in chan_sip - core show locks shows do_monitor lock
Environment:CentOS 6.8 64 bit, kernel 3.4.53-8.el6.centos.alt.x86_64, backported UnixODBC 2.3.4Attachments:( 0) backtrace-threads.txt
( 1) backtrace-threads2.txt
( 2) core-show-locks.txt
( 3) core-show-locks2.txt
Description:I am experiencing locks while using chan_sip with latest 13.10.0-rc3.

The visible effect is asterisk stops processing SIP packets and the UDP buffer you can see with "netstat -nap | grep 5060" fills up:

# netstat -nap | grep 5060
udp   214272      0 0.0.0.0:5060                0.0.0.0:*                               7358/asterisk

=======================================================================
=== 13.10.0-rc3
=== Currently Held Locks
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 0x7ff787396700 LWP:6779 (do_monitor           started at [29509] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 29480 do_monitor &monlock 0x7ff78f3ab8a0 (1)
       main/backtrace.c:59 __ast_bt_get_addresses() (0x46888c+1D)
       main/lock.c:258 __ast_pthread_mutex_lock() (0x53c89d+BA)
       channels/chan_sip.c:29481 do_monitor()
       main/utils.c:1235 dummy_start()
       libpthread.so.0 <unknown>()
       libc.so.6 clone() (0x3a790e8af0+6D)
=== -------------------------------------------------------------------
===
=======================================================================
Comments:By: Asterisk Team (asteriskteam) 2016-07-16 02:53:46.547-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Leandro Dardini (ldardini) 2016-07-16 02:59:06.194-0500

Two locks in series, having restarted asterisk between the two.