[Asterisk-code-review] chan pjsip: segfault on already disconnected session (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Wed Oct 19 08:37:50 CDT 2016


Alexei Gradinari has posted comments on this change. ( https://gerrit.asterisk.org/4142 )

Change subject: chan_pjsip: segfault on already disconnected session
......................................................................


Patch Set 1:

> I don't think this is the correct fix and just narrows the window.
 > If another thread is terminating the INVITE session and making our
 > reference no longer valid then it is still possible for the INVITE
 > session to become invalid in a narrow window.
 > 
 > What would be useful is a full backtrace and a description of what
 > threads are doing what and when, as well as what PJSIP version is
 > in use.

It's the same as and continuation of https://gerrit.asterisk.org/#/c/3514/
What do you mean "reference no longer"? What's reference?
The INVITE session will be destroyed when a reference counter reaches zero.
Before placing a task into a taskprocessor this patch increases the reference counter.
When the task is run the INVITE session is valid because the reference counter above zero.

The full backtrace is huge because these segfaults happened on stress tests.

The scenario is simple.
sipp TLS-endpoint1 -> INVITE -> asterisk
asterisk -> MESSAGE -> sipp TLS-endpoint1
asterisk -> INVITE -> sipp TLS-endpoint2
 
The bundled PJSIP version.

-- 
To view, visit https://gerrit.asterisk.org/4142
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2e3e2f75358cdb530252a9ce158af3d5d9fdf33
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list