[asterisk-dev] [Code Review] 4178: res_pjsip_outbound_publish: stack overflow when using non-default sorcery wizard
Kevin Harwell
reviewboard at asterisk.org
Thu Dec 4 09:35:12 CST 2014
> On Dec. 3, 2014, 10:48 a.m., Joshua Colp wrote:
> > branches/13/res/res_pjsip_outbound_publish.c, lines 1268-1269
> > <https://reviewboard.asterisk.org/r/4178/diff/2/?file=69153#file69153line1268>
> >
> > You need to be in a loop here. It's possible for this to get spuriously triggered.
> >
> > As for the time limit - can things be in a state where that is safe to do?
> >
> > Some logging would also be useful so people know what is going on if it waits a bit.
>
> Kevin Harwell wrote:
> What do you mean by putting it in a loop or being spuriously triggered?
>
> Also as far as the time limit goes I think things should be fine. If it times out then the module won't unload, so anything left could still finish up. I mainly put it in so it wouldn't potentially sit there forever if a problem occurred or something took too long.
>
> Joshua Colp wrote:
> From my memory ast_cond_wait and ast_cond_timedwait may return without having been signaled, but I could be misremembering.
Okay yeah makes sense. According to the docs it looks like it can be interrupted.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4178/#review13875
-----------------------------------------------------------
On Nov. 20, 2014, 3:43 p.m., Kevin Harwell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4178/
> -----------------------------------------------------------
>
> (Updated Nov. 20, 2014, 3:43 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-24514
> https://issues.asterisk.org/jira/browse/ASTERISK-24514
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> When using a non-default sorcery wizard (in this instance realtime) for outbound publishes Asterisk will crash after a stack overflow occurs due to the code infinitely recursing. The fix entails removing the outbound publish state dependency from the outbound publish sorcery object and instead keeping an in memory container that can be used to lookup the state when needed.
>
>
> Diffs
> -----
>
> branches/13/res/res_pjsip_outbound_publish.c 428498
>
> Diff: https://reviewboard.asterisk.org/r/4178/diff/
>
>
> Testing
> -------
>
> On top of running the current testsuite tests I also manually tested various configurations and scenarios using a static configuration file as well as dynamic realtime. Verified that the crash no longer occurs and the potentially affected functionality works as expected (for instance, module [re]loading).
>
>
> Thanks,
>
> Kevin Harwell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141204/b04947ef/attachment.html>
More information about the asterisk-dev
mailing list