[Home]

Summary:ASTERISK-29101: chan_sip: Deadlock with res_rtp_asterisk
Reporter:Vijo Jose (vijo)Labels:
Date Opened:2020-09-28 23:59:07Date Closed:2020-11-04 12:00:02.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General Resources/res_rtp_asterisk
Versions:16.1.1 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:CentOS Linux release 7.6.1810 (Core) Attachments:( 0) txt_coredump.zip
Description:Hi all.
I have an asterisk server installed with version 16.1.1 on centos 7 Os.

I have noticed that sometimes my all SIP peers going unreachable including the looping SIP trunk(127.0.0.1) which I have. I was checking for the locks in asterisk using asterisk -rx “core show locks” and below is my result.
{noformat}
===
=== Thread ID: 0x7f1ea0930700 LWP:30389 (do_monitor           started at [29979] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 29340 handle_request_do &netlock 0x7f1f01b2f680 (1)
asterisk(__ast_pthread_mutex_lock+0x85) [0x501885]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa33d6) [0x7f1f018ff3d6]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa4fcf) [0x7f1f01900fcf]
asterisk(ast_io_wait+0x7a) [0x4f517a]
/usr/lib64/asterisk/modules/chan_sip.so(+0x8086c) [0x7f1f018dc86c]
asterisk() [0x5a0412]
/usr/lib64/libpthread.so.0(+0x7dd5) [0x7f1f2690cdd5]
/usr/lib64/libc.so.6(clone+0x6d) [0x7f1f25caf02d]
=== ---> Lock #1 (chan_sip.c): MUTEX 9370 sip_pvt_lock_full pvt 0x7f1e000661a0 (1)
asterisk(__ast_pthread_mutex_lock+0x85) [0x501885]
asterisk(__ao2_lock+0x1c5) [0x45d7f5]
/usr/lib64/asterisk/modules/chan_sip.so(+0x14bd5) [0x7f1f01870bd5]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa3405) [0x7f1f018ff405]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa4fcf) [0x7f1f01900fcf]
asterisk(ast_io_wait+0x7a) [0x4f517a]
/usr/lib64/asterisk/modules/chan_sip.so(+0x8086c) [0x7f1f018dc86c]
asterisk() [0x5a0412]
/usr/lib64/libpthread.so.0(+0x7dd5) [0x7f1f2690cdd5]
/usr/lib64/libc.so.6(clone+0x6d) [0x7f1f25caf02d]
=== ---> Lock #2 (rtp_engine.c): MUTEX 692 ast_rtp_instance_set_prop instance 0x7f1e000347c0 (1)
asterisk(__ast_pthread_mutex_lock+0x85) [0x501885]
asterisk(__ao2_lock+0x1c5) [0x45d7f5]
asterisk(ast_rtp_instance_set_prop+0x29) [0x53ed79]
/usr/lib64/asterisk/modules/chan_sip.so(+0x27ee4) [0x7f1f01883ee4]
/usr/lib64/asterisk/modules/chan_sip.so(+0x95f88) [0x7f1f018f1f88]
/usr/lib64/asterisk/modules/chan_sip.so(+0x9771c) [0x7f1f018f371c]
/usr/lib64/asterisk/modules/chan_sip.so(+0x9a820) [0x7f1f018f6820]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa0bcd) [0x7f1f018fcbcd]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa351e) [0x7f1f018ff51e]
/usr/lib64/asterisk/modules/chan_sip.so(+0xa4fcf) [0x7f1f01900fcf]
asterisk(ast_io_wait+0x7a) [0x4f517a]
/usr/lib64/asterisk/modules/chan_sip.so(+0x8086c) [0x7f1f018dc86c]
asterisk() [0x5a0412]
/usr/lib64/libpthread.so.0(+0x7dd5) [0x7f1f2690cdd5]
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2020-09-28 23:59:08.032-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2020-09-29 04:10:39.191-0500

It appears the bug you have submitted is against a rather old version of a supported branch of Asterisk. There have been many issues fixed between the version you are using and the current version of your branch. Please test with the latest version in your Asterisk branch and report whether the issue persists.

Please see the Asterisk Versions [1] wiki page for info on which versions of Asterisk are supported.
[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions



By: Asterisk Team (asteriskteam) 2020-10-13 12:00:00.702-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

By: Asterisk Team (asteriskteam) 2020-10-15 07:16:46.958-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Vijo Jose (vijo) 2020-10-15 07:17:02.915-0500

I have also upgarded the asterisk version to the lastest 16.13.0 and still facing the same issue again.

By: Kevin Harwell (kharwell) 2020-10-15 09:47:20.319-0500

--The given stack trace does not have enough information.--

*edit* realized the data posted is from the lock file. Doing the below could also be helpful if you are able.

Please ensure you have the appropriate debug symbols installed, and Asterisk has been compiled with DONT_OPTIMIZE selected. Then next time this issues occur execute the {{ast_coredumper}} script against the running Asterisk, and attach its results (the *.txt files) here. More information on how to do all that can be found here:

https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Thanks!

By: Vijo Jose (vijo) 2020-10-19 03:43:01.071-0500

Hai

I have a coredump file when i had the issue last week, which is around 4.2 Gb size. How can i attach those ?


By: Vijo Jose (vijo) 2020-10-19 03:49:29.605-0500

This is the core dump file when I had the issue.

By: Joshua C. Colp (jcolp) 2020-10-19 04:19:10.401-0500

Your system is deadlocked while attempting to resolve its own hostname it seems. Is it in /etc/hosts so it does not require contacting an external DNS server?

By: Vijo Jose (vijo) 2020-10-21 02:33:24.464-0500

I have checked we are using only one hostname for SIP which is already mentioned in the host file.

sip.conf we are using the telecom operator SIP Trunk Host as chn.siptrunk.ims.bsnl.in

cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
##::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.181.33.1 chn.siptrunk.ims.bsnl.in


By: Joshua C. Colp (jcolp) 2020-10-21 03:38:57.363-0500

Your system has a local hostname, viewable using the "hostname" command in your shell, this is what I was referring to and should be present in /etc/hosts

By: Asterisk Team (asteriskteam) 2020-11-04 12:00:01.550-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines