> On Jan. 29, 2015, 10:14 a.m., Joshua Colp wrote:
> > branches/13/res/res_pjsip_outbound_publish.c, line 927
> > <https://reviewboard.asterisk.org/r/4384/diff/2/?file=71172#file71172line927>
> >
> >     So...
> >     
> >     This may actually cause publish state to be reflected incorrectly on 
> > the remote side if you remove it from the head of the queue. Another 
> > publish for the same thing can be queued afterwards. If you move this to 
> > the tail of the queue then it will be out of order.
> >     
> >     As well - wouldn't this cause to the queue to potentially grow 
> > uncontrollably?
> 
> Kevin Harwell wrote:
>     Aaah yes things would be out of order. I see now and if I leave the 
> current one in the queue and new ones are added then things would continue to 
> grow.
>     
>     Hmm, what do you think about this: if the current publish receives no 
> response check to see if it is the only one in the queue. If it is then leave 
> it otherwise drop it allowing the the next one to try?
>     
>
> 
> Joshua Colp wrote:
>     Hum. Within the scope of the Asterisk publishing stuff that would mean 
> that some updates may get lost. I don't think there's a really nice way to 
> overcome that.

I think if we run into that problem, then there's probably bigger problems then 
merely reflecting device state. You'd have to have a very unresponsive system 
(it's down), at which point when it comes back, it'd want to resynch the state 
anyway.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4384/#review14356
-----------------------------------------------------------


On Jan. 29, 2015, 12:52 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4384/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2015, 12:52 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24635
>     https://issues.asterisk.org/jira/browse/ASTERISK-24635
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When Asterisk attempts to send SIP outbound publish information and no 
> response is ever received (no 200 okay, 412, 423) the system eventually 
> crashes. A response is never received because the system Asterisk is 
> attempting to send publish information to is not available. The underlying 
> pjsip framework attempts to send publish information. After several attempts 
> it calls back into the Asterisk outbound publish code. At this point if the 
> "client->queue" is empty Asterisk attempts to schedule a refresh which 
> utilizes "rdata" and since no response was received the given "rdata" 
> struture is NULL. Attempting to dereference a NULL object of course results 
> in a crash.
> 
> This patch re-queues the current message that has not received a response yet 
> (has no "rdata"), thus removing the possibility of the queue being empty and 
> having no "rdata" available. Consequently, in this scenario, the publish 
> refresh is not called and the crash is avoided.
> 
> 
> Diffs
> -----
> 
>   branches/13/res/res_pjsip_outbound_publish.c 431402 
> 
> Diff: https://reviewboard.asterisk.org/r/4384/diff/
> 
> 
> Testing
> -------
> 
> First duplicated the problem by attempting to publish to a non existent 
> system (after a bit Asterisk crashed). After applying the patch using the 
> same setup Asterisk no longer crashed. Also ran the current set of outbound 
> publish testsuite tests to make sure those still passed.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to