[asterisk-dev] [Code Review] Pickup can leave orphan channels in race condition
irroot
reviewboard at asterisk.org
Fri Jul 29 11:12:03 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1323/
-----------------------------------------------------------
(Updated July 29, 2011, 11:12 a.m.)
Review request for Asterisk Developers.
Changes
-------
Ok reworked the kludge i was throwing at it ...
should i only run the second check if the DL avoidance was used setting a variable "recheck" to make it more readable ??
prevent double masqurading channels when one is been hung up and deadlock avoidance is used.
Summary
-------
seems like app_queue [and others likely] can leave a orphaned channel with no bridge and no thread running on it.
this is "ungood" here is a small patch that starts auto service waits for bridging and turns it off allowing the
hangup frame to get through and shut down the channel ...
Diffs (updated)
-----
/team/irroot/distrotech-customers-1.8/main/channel.c 330200
Diff: https://reviewboard.asterisk.org/r/1323/diff
Testing (updated)
-------
[Jul 29 09:23:57] NOTICE[9698] app_directed_pickup.c: pickup SIP/0207-000002d3 attempt by SIP/0226-000002d5
[Jul 29 09:23:58] WARNING[9698] chan_sip.c: No SIP tech_pvt! Fixup of SIP/0226-000002d5 failed.
[Jul 29 09:23:58] WARNING[9698] channel.c: Fixup failed on channel SIP/0226-000002d5<MASQ>, strange things may happen.
[Jul 29 09:25:10] NOTICE[10465] chan_sip.c: Disconnecting call 'SIP/0226-000002d5' for lack of RTP activity in 61 seconds
it seems possible this is a race condition between ast_hangup and ast_do_masquerade
do_masq holds the channels container [not allowing the channels to be unlinked] it also holds the original channel
ast_hangup hold origchan but will unlock it to run do_masq
do_masq will release the origchannel to avoid a deadlock with the clonechannel when this happens do_masq will run twice and orig chan will be removed by hangup
clonechan will be striped of all dignity
Thanks,
irroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110729/f078c0a5/attachment-0001.htm>
More information about the asterisk-dev
mailing list