[Live-devel] Server runaway streams for shared session for RTP-over-TCP client

John Tam tamj01 at hotmail.com
Thu Sep 9 12:16:37 PDT 2010


Strange indeed.  This unable to frame the TEARDOWN message has not been happening before, otherwise, I would not be able to track down the original reported problem.  I guess having to read one byte at a time, going back to the outer loop and doing a select() can open a big window of opportunity for things to happen.
 
I ran it again with VLC 1.1.3.  I am attaching the console debug messages and Wireshark network capture.  In this instance, the tcpReadHandler1() code began to read the 'T' then turned off reading of socket and left the TCP session dangling.  The network capture shows the whole TEARDOWN message being sent by the client, and the client even sent a RTCP BYE before closing the connection.
 
I think in general, the tcpReadHandler1() should initiate some cleanup upon a TCP socket failure because it knows the association between the socket number and the client session object.  I just cannot come up iwth a good suggestion to tie it together to the fServerRequestAlternativeByteHandler callback.
 
    [repeat .....]
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: completed
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: completed
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: completed
sendRTPOverTCP: 762 bytes over channel 0 (socket 4172)
sendRTPOverTCP: completed
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: completed
RTSPClientSession[03A1D018]::handleRequestBytes() read 1 new bytes:T
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: failed!
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: failed!
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: failed!
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: failed!
sendRTPOverTCP: 1448 bytes over channel 0 (socket 4172)
sendRTPOverTCP: failed!
    [repeat .....]

Regards,
John Tam
 


Date: Wed, 8 Sep 2010 18:47:49 -0700
To: live-devel at ns.live555.com
From: finlayson at live555.com
Subject: Re: [Live-devel] Server runaway streams for shared session for RTP-over-TCP client





Thanks for the fix.  And I will take your advise and use a different email account when I post a new issue.  For the moment, I am running into another senario of a runaway RTP-over-TCP session, and it is preventing me from testing your last fix.  
 
The problem is in the SocketDescriptor::tcpReadHandler1() function between the lines 362-368 in RTPInterface.cpp.  What happens is that the handler could not complete to frame the TEARDOWN command before the client shuts the socket.  It results in a socket read error, and there is no provision to teardown the client session.


Thanks for the report.  Unfortunately I can't reproduce this myself, so you're going to have to help track this down a little more.


It's strange that you're getting a socket read error before the server has read, parsed and processed the incoming "TEARDOWN" request.  What is supposed to be happening is that "RTSPServer:: handleRequestBytes(1)" gets called - one byte at a time - for each byte in the incoming "TEARDOWN" request.  When it sees the last byte of the request (the final LF in the CR-LF-CR-LF sequence), it should then be calling "handleCmd_withinSession("TEARDOWN", ...)", which should then in turn call "handleCmd_TEARDOWN()" to close the session.  It is only the *next* (single-byte) socket read that should be getting a read error.


Could you look into why this is not working properly for you?




 For whatever reason, this senario keeps happening to me nowadays although I am using the same client program [VLC 0.9.6] as before, and I cannot verify your last fix.


Does the problem still occur if you use a new version of VLC (1.1.3)?  It shouldn't make a difference, but it's worth checking...-- 


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________ live-devel mailing list live-devel at lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100909/206c774f/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ConsoleMessages.txt
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100909/206c774f/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: NetworkCapture.ethereal
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100909/206c774f/attachment-0001.ksh>


More information about the live-devel mailing list