[asterisk-dev] [Code Review] Avoid deadlocks in chan_sip - 1.6.0
Olle E Johansson
oej at edvina.net
Thu Nov 19 11:02:38 CST 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/433/
-----------------------------------------------------------
Review request for Asterisk Developers.
Summary
-------
While running 1.6.0 in production, we have stumbled over a few deadlocks that we have proven to avoid with these changes.
- CLI "sip show channels" can cause serious damage before this change
- Retrans_pkt had some issues with locking the Ast_channel
- Both sip_write and sip_read was hanging waiting for a better time.
We debugged with GDB to see where each thread was hanging and found all these issues. Tested with and without patches and the issues disappeared on the patched systems.
Locking is a part of Asterisk coding that I'm far away from being a master in - so please give feedback. I'm sure there's a lot of room for improvement.
(And yes, I noticed the red box in the patch. Will remove.)
Diffs
-----
/team/oej/moretrylock-1.6.0/channels/chan_sip.c 230467
Diff: https://reviewboard.asterisk.org/r/433/diff
Testing
-------
The patches has been running in production on a couple of PBXs for a couple of weeks without causing any harm that we're aware of.
Thanks,
Olle E
More information about the asterisk-dev
mailing list