[Asterisk-code-review] chan sip: Fix segfault during module unload (asterisk[13])
Michael Kuron
asteriskteam at digium.com
Tue Nov 29 13:47:26 CST 2016
Michael Kuron has posted comments on this change. ( https://gerrit.asterisk.org/4494 )
Change subject: chan_sip: Fix segfault during module unload
......................................................................
Patch Set 1:
I think I understand the second segfault better now. It's not actually a stack corruption. When ast_tcptls_client_start() returns, the function that called it, _sip_tcp_helper_thread(), is no longer in memory as chan_sip.so has been dlclose()d. So the only way to fix that segfault in all circumstances (my SA_RESTART fix only captures the most likely one) is to wait until the threadt container has become empty before completing the unload (right now we only wait for up to five seconds). Even if we do that, we'd still need to remove SA_RESTART, otherwise module unload chan_sip may take as long as the TCP connect() timeout.
--
To view, visit https://gerrit.asterisk.org/4494
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I76fd9d47d56e4264e2629bce8ec15fecba673e7b
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Michael Kuron <m.kuron at gmx.de>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Michael Kuron <m.kuron at gmx.de>
Gerrit-HasComments: No
More information about the asterisk-code-review
mailing list