[Home]

Summary:ASTERISK-29429: asterisk deadlock issue
Reporter:priya (priya)Labels:
Date Opened:2021-05-13 02:04:31Date Closed:2021-05-15 03:59:57
Priority:MajorRegression?
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:13.18.2 Frequency of
Occurrence
Related
Issues:
Environment:openwrtAttachments:
Description:+ We are facing asterisk deadlock issue everyday with call load of 32 channel at a time.
+ Can Dial plan handling also create deadlock issue.
+  We need some guidance only which part of code or Dial Plan we can check,
i am going to attach "core show lock" output.

=======================================================================
=== 13.18.2
=== Currently Held Locks
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 0x76524d2c LWP:350 (do_devstate_changes  started at [  646] devicestate.c ast_device_state_engine_init())
=== ---> Lock #0 (main.c): RDLOCK 1113 find_device_ex &(&state->devices)->lock 0x5d20f8 (1)
=== ---> Waiting for Lock #1 (main.c): MUTEX 1116 find_device_ex &pvt->lock 0x659104 (1)
=== --- ---> Locked Here: main.c line 514 (call_monitor)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x768a6d2c LWP:1427 (thread_discovery started at [  913] chan_dongle.c discovery_restart())
=== ---> Lock #0 (main.c): MUTEX 514 call_monitor &pvt->lock 0x659104 (1)
=== ---> Waiting for Lock #1 (channel.c): MUTEX 1080 __ast_queue_frame chan 0x712fa0 (1)
=== --- ---> Locked Here: channel.c line 2718 (ast_hangup)
=== -------------------------------------------------------------------
=== -------------------------------------------------------------------
===
=== Thread ID: 0x76790d2c LWP:19943 (pbx_thread           started at [ 4634] pbx.c ast_pbx_start())
=== ---> Lock #0 (channel.c): MUTEX 2718 ast_hangup chan 0x712fa0 (1)
=== ---> Waiting for Lock #1 (channel.c): MUTEX 408 channel_hangup &pvt->lock 0x659104 (1)
=== --- ---> Locked Here: main.c line 514 (call_monitor)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x744a7d2c LWP:28095 (netconsole           started at [ 1739] asterisk.c listener())
=== ---> Lock #0 (cli.c): RDLOCK 76 cli_show_devices &(&gpublic->devices)->lock 0x5d20f8 (1)
=== ---> Waiting for Lock #1 (cli.c): MUTEX 79 cli_show_devices &pvt->lock 0x659104 (1)
=== --- ---> Locked Here: main.c line 514 (call_monitor)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x744e5d2c LWP:28218 (pbx_thread           started at [ 4634] pbx.c ast_pbx_start())
=== ---> Lock #0 (main.c): RDLOCK 1164 find_device_by_resource_ex &(&state->devices)->lock 0x5d20f8 (1)
=== ---> Waiting for Lock #1 (main.c): MUTEX 1201 find_device_by_resource_ex &pvt->lock 0x659104 (1)
=== --- ---> Locked Here: main.c line 514 (call_monitor)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x7442bd2c LWP:28406 (pbx_thread           started at [ 4634] pbx.c ast_pbx_start())
=== ---> Lock #0 (main.c): RDLOCK 1164 find_device_by_resource_ex &(&state->devices)->lock 0x5d20f8 (1)
=== ---> Waiting for Lock #1 (main.c): MUTEX 1201 find_device_by_resource_ex &pvt->lock 0x659104 (1)
Comments:By: Asterisk Team (asteriskteam) 2021-05-13 02:04:32.508-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: Asterisk Team (asteriskteam) 2021-05-13 02:04:33.006-0500

Per the Asterisk versions page [1], the maintenance (bug fix) support for the Asterisk branch you are using has ended. For continued maintenance support please move to a supported branch of Asterisk. After testing with a supported branch, if you find this problem has not been resolved, please open a new issue against the latest version of that Asterisk branch.

Thanks!

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

By: Asterisk Team (asteriskteam) 2021-05-13 02:04:33.622-0500

The severity of this issue has been automatically downgraded from "Blocker" to "Major". The "Blocker" severity is reserved for issues which have been determined to block the next release of Asterisk. This severity can only be set by privileged users. If this issue is deemed to block the next release it will be updated accordingly during the triage process.

By: Asterisk Team (asteriskteam) 2021-05-13 02:09:13.558-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: priya (priya) 2021-05-13 02:11:42.677-0500

I am expecting only guidance on this issue, after checking core show lock output if someone can give hint why deadlock is there i will see it by own.
here the problem is "ast_hangup() is not releasing lock".

By: Joshua C. Colp (jcolp) 2021-05-13 03:59:07.937-0500

You can try finding help elsewhere, but this is an ancient version of Asterisk 13 and is not supported. It's entirely possible it's been fixed, and it is unlikely anyone will spend the time investigating it.

By: priya (priya) 2021-05-15 02:09:28.599-0500

hello sir,

Thank you sir for your reply,
*I will not waste your time after this question*

Please can you help me to know which "version of asterisk" i can use for "asterisk-chan-dongle-2018".(https://github.com/haha8x/asterisk-chan-dongle-16), if you will suggest it will help to me.
Thank you sir for giving guidance on this.


By: Asterisk Team (asteriskteam) 2021-05-15 02:09:29.137-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: Joshua C. Colp (jcolp) 2021-05-15 03:59:57.703-0500

The chan_dongle module is an outside module, all questions about it should be directed to where it exists externally. I can't look at the code and won't provide any comments on it.