[asterisk-bugs] [JIRA] (ASTERISK-30258) Dialing API: Cancel a running async thread, does not always cancel all calls
Friendly Automation (JIRA)
noreply at issues.asterisk.org
Wed Oct 26 11:22:09 CDT 2022
[ https://issues.asterisk.org/jira/browse/ASTERISK-30258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260510#comment-260510 ]
Friendly Automation commented on ASTERISK-30258:
------------------------------------------------
Change 19487 merged by Friendly Automation:
Dialing API: Cancel a running async thread, may not cancel all calls
[https://gerrit.asterisk.org/c/asterisk/+/19487|https://gerrit.asterisk.org/c/asterisk/+/19487]
> Dialing API: Cancel a running async thread, does not always cancel all calls
> ----------------------------------------------------------------------------
>
> Key: ASTERISK-30258
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-30258
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/Dial
> Affects Versions: 18.6.0
> Reporter: Frederic LE FOLL
> Assignee: Frederic LE FOLL
>
> A race condition may occur in ast_dial_join() function (Dialing API: Cancel async thread), if caller cancels its call while a called party has just answered but has not yet started running its application.
> This was detected with Page() application, calling approx 20 called parties with auto-answer, and caller almost immediately canceling its call (e.g. within 10 to 50 milliseconds).
> Called party that has answered just before caller hangup:
> - has not yet the is_running_app flag up, thus ast_dial_join() does not do Soft Hangup,
> - but has left the waitfor loop, thus pthread_kill() does not have the expected effect.
> Observation: when this race condition occurs for Page application, then :
> - called parties (with one ast_dial_run() per called party) do not get cancelled, they start executing the application (ConfBridge for Page) and never get kicked out, because caller never got connected to ConfBridge,
> - caller Channel gets stuck in ast_dial_join() because pthread_join(thread, NULL) never ends, except if all called devices hangup.
> This was seen with Asterisk 18.6 but it should be reproductible with other versions, since ast_dial_join() has not changed in recent versions.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list