[asterisk-dev] [Code Review] Convert device state callbacks to ao2 objects to fix a deadlock.
Jeff Peeler
reviewboard at asterisk.org
Wed Jan 12 15:19:26 CST 2011
> On 2011-01-10 02:42:10, schmidts wrote:
> > /branches/1.6.2/main/pbx.c, line 3929
> > <https://reviewboard.asterisk.org/r/1072/diff/1/?file=14863#file14863line3929>
> >
> > sorry if this is a stupid question but why do you set the refcounter for this container one down?
> >
> > you dont use the same container to iterate through so IMHO you dont need to reset the refcounter.
> >
> > the iterator is reinitialised below this row for the callback container of this hint so i dont think you need this.
> >
> > be honest if i am wrong ;)
You are correct, removed!
> On 2011-01-10 02:42:10, schmidts wrote:
> > /branches/1.6.2/main/pbx.c, line 4132
> > <https://reviewboard.asterisk.org/r/1072/diff/1/?file=14863#file14863line4132>
> >
> > IMHO you dont need to allocate this container with 563 buckets, cause you will in fact only need a link list.
> > The normal callback container should have buckets, even if they are useless cause all general callbacks have id=0.
> > maybe you could change this cause with this patch general and linked callbacks are split up.
> > the id=0 was only used to find these general callbacks.
> > but again the general callbacks and also the linked only need a link list ;)
I think I'll just keep them separate for now and reduce its size.
- Jeff
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1072/#review3086
-----------------------------------------------------------
On 2011-01-07 15:06:45, Jeff Peeler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1072/
> -----------------------------------------------------------
>
> (Updated 2011-01-07 15:06:45)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> Lock scenario:
> Thread 1
> holds ast_rdlock_contexts &conlock
> holds handle_statechange hints
> holds handle_statechange hint
> waiting for cb_extensionstate
> Locked Here: chan_sip.c line 7428 (find_call)
> Thread 2
> holds handle_request_do &netlock
> holds find_call sip_pvt_ptr
> waiting for ast_rdlock_contexts &conlock
> Locked Here: pbx.c line 9911 (ast_rdlock_contexts)
>
> Chan_sip has an established locking order of locking the sip_pvt and then getting the context lock. So the as stated by the summary, the operations in thread 2 have been modified to no longer require the context lock.
>
>
> This addresses bug 18310.
> https://issues.asterisk.org/view.php?id=18310
>
>
> Diffs
> -----
>
> /branches/1.6.2/main/pbx.c 301088
>
> Diff: https://reviewboard.asterisk.org/r/1072/diff
>
>
> Testing
> -------
>
> one47 has reported on the issue that it has been going well so far (for 18 hours):
> https://issues.asterisk.org/view.php?id=18310#130297
>
>
> Thanks,
>
> Jeff
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110112/5d877c81/attachment.htm>
More information about the asterisk-dev
mailing list