[asterisk-bugs] [JIRA] (ASTERISK-25094) PBX core: Investigate thread safety issues
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Sun Jul 26 11:56:36 CDT 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-25094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-25094:
-----------------------------------
Target Release Version/s: 13.5.0
> PBX core: Investigate thread safety issues
> ------------------------------------------
>
> Key: ASTERISK-25094
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25094
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Core/PBX
> Affects Versions: SVN, 11.17.1, 13.3.2
> Reporter: Corey Farrell
> Target Release: 11.19.0, 13.5.0
>
>
> While working on ASTERISK-25085 I found that {{ast_context_find}} and {{ast_context_find_or_create}} are not thread safe. They both return an ast_context, but as soon as these functions run {{ast_unlock_contexts}} it's possible for another thread to cause the context to be freed.
> Any function that works with ast_context pointers (input or output) and runs it's own locking is likely unsafe for the same reason.
> I think we need a _nolock versions of many functions, where the caller would run them with a lock. For master maybe it would be better for ast_context to become an AO2 object? This way we could avoid destroying contexts during merge operations, we would just copy references of original contexts that we still need, then unreference everything from the original list when we swap out.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list