[asterisk-bugs] [JIRA] (ASTERISK-29609) Subsequent 'ael reload' will cause a lock up
Mark Murawski (JIRA)
noreply at issues.asterisk.org
Tue Aug 24 12:13:33 CDT 2021
[ https://issues.asterisk.org/jira/browse/ASTERISK-29609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=256047#comment-256047 ]
Mark Murawski commented on ASTERISK-29609:
------------------------------------------
Crash reproduction:
Terminal 1
{code}
for i in `seq 1 20`; do asterisk -rx "ael reload" & done
{code}
Terminal 2
{code}
Asterisk Ready.
*CLI> -- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
-- Remote UNIX connection
[2021-08-24 13:11:47.262-0400] WARNING[22726]: ael/pval.c:2525 check_pval_item: Warning: file /etc/asterisk/ael/AgiAel/CallQueue/CallQueue.ael, line 53-53: application call to GoSub affects flow of control, and needs to be re-written using AEL if, while, goto, etc. keywords instead!
[2021-08-24 13:11:47.267-0400] ERROR[22728]: ael.flex:489 ael_yylex: File=, line=219, column=12: Mismatched ')' in expression!
[2021-08-24 13:11:47.267-0400] ERROR[22728]: ael.y:840 ael_yyerror: ==== File: (null), Line 275, Cols: 1-1: Error: syntax error, unexpected ';', expecting ')' or ','
[2021-08-24 13:11:47.268-0400] ERROR[22725]: ael.flex:489 ael_yylex: File=, line=219, column=15: Mismatched ')' in expression!
[2021-08-24 13:11:47.268-0400] ERROR[22725]: ael.y:840 ael_yyerror: ==== File: (null), Line 356, Cols: 172-172: Error: syntax error, unexpected ';', expecting ')' or ','
[2021-08-24 13:11:47.268-0400] ERROR[22725]: ael.y:840 ael_yyerror: ==== File: (null), Line 366, Cols: 3-6: Error: syntax error, unexpected word
Segmentation fault
{code}
> Subsequent 'ael reload' will cause a lock up
> --------------------------------------------
>
> Key: ASTERISK-29609
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-29609
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: PBX/pbx_ael
> Affects Versions: GIT, 16.15.1, 17.9.3, 18.6.0
> Reporter: Mark Murawski
> Assignee: Mark Murawski
> Severity: Major
> Attachments: locks-after-15-seconds.txt, locks-after-30-seconds.txt, thread-all-bt.txt
>
>
> Requirements for reproduction of bug:
> - Have a 'decent amount' of ael. In this case, I have 650 lines of AEL in variety of files.
> Obviously not a 'normal' use case to issue 10 reloads at once, but when multiple scripts/systems might be asking Asterisk to reload at the same time, this could be triggered.
> 5 to 10 reloads should do it!
> {code}
> vbox-markm-x64 {/etc/asterisk/ael} root# for i in `seq 1 10`; do asterisk -rx "ael reload" & done
> [1] 12335
> [2] 12336
> [3] 12337
> [4] 12338
> [5] 12339
> [6] 12340
> [7] 12341
> [8] 12342
> [9] 12343
> [10] 12344
> vbox-markm-x64 {/etc/asterisk/ael} root# asterisk -rx "core show locks" | grep "Thread ID" | wc -l
> 12
> {code}
> Depending what else is running at the time (perhaps pjsip adding hints to dialplan). This will escallate quickly and lead to a very locked up Asterisk
> The fix is to address the missing reload mutex in pbx_ael.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list