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

Alexei Gradinari asteriskteam at digium.com
Wed Oct 19 08:59:48 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:

> Where and what dropped the reference count to zero, and were we
 > informed but the task is delayed/in queue?
The pjsip_inv_dec_ref decreases the counter
and if the counter has reached zero then the session will be destroyed.

The counter is increased before placing the task to a serializer.
The counter is decreased when the task done or failed.

 > 
 > As well the lifetime of the INVITE session is linked to the dialog,
 > which we hold a reference to therefore it should still be valid. Is
 > the INVITE session actually still valid but in a state where we are
 > trying to do something and it is asserting? Was it built with
 > debug?
The lifetime of the INVITE session is controlled ONLY by the reference counter.
If the dialog is valid it doesn't mean the the INVITE session is valid.

It was discussed in https://gerrit.asterisk.org/#/c/3514/

-- 
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