[Home]

Summary:ASTERISK-25163: Deadlock in chan_sip between reload of sip peer container and MWI Stasis callback
Reporter:Dmitriy Serov (Demon)Labels:
Date Opened:2015-06-16 03:13:03Date Closed:2015-06-21 09:19:51
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:13.4.0 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Attachments:( 0) 2015_06_18.backtrace-threads.txt
( 1) backtrace-threads.txt
Description:Asterisk periodic hangs.
UDP Recv-Q greatly exceeds zero.
No errors in log (like DNS error, function getaddr).

used cdr_mysql, peers in text config, chan_sip & res_pjsip on different ports.
Comments:By: Dmitriy Serov (Demon) 2015-06-16 03:14:08.979-0500

Hangs backtrace

By: Dmitriy Serov (Demon) 2015-06-17 06:57:27.735-0500

The reason may be a high workload mariadb. For example, in the case of the db backup every night.
Although, during day occurs, but much less frequently.
After abandoning the use of res_pjsip (but the module is still loaded), the situation began to occur less frequently.

By: Dmitriy Serov (Demon) 2015-06-18 03:24:21.916-0500

just one more backtrace

By: Matt Jordan (mjordan) 2015-06-18 16:12:44.485-0500

This actually is a deadlock in {{chan_sip}}, due to an inversion in locking between the Stasis MWI callback and the act of reloading.

By: Joshua C. Colp (jcolp) 2015-06-20 19:50:32.877-0500

I've put a change up at https://gerrit.asterisk.org/673 which should resolve this issue.