[asterisk-bugs] [JIRA] (ASTERISK-30258) Dialing API: Cancel a running async thread, does not always cancel all calls

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Dec 15 07:05:58 CST 2022


     [ https://issues.asterisk.org/jira/browse/ASTERISK-30258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asterisk Team updated ASTERISK-30258:
-------------------------------------

    Target Release Version/s: 19.8.0

> 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
>      Target Release: 19.8.0, 20.1.0
>
>
> 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