[Live-devel] Overuse of CPU in binaries of CYGWIN

Ross Finlayson finlayson at live555.com
Thu Feb 27 16:19:43 PST 2014


(Remember everyone - if you're responding to a message in a mailing list digest, make sure to fix the "Subject:" line in your response.  (I've done it for you here.))


On Feb 27, 2014, at 8:29 PM, Martínez Contador, Daniel [ELIMCO] (CA) <ELIMCO.dmartinez at navantia.es> wrote:

>> Remember, You Have Complete Source Code.  Rather than making "an educated guess", you should be able to figure out exactly what's going on.
> Oh, thank you, but you overstimate my ability to undertand other people's code and design decisions.

And you overestimate my ability to spend lots of time helping people 'for free :-).  But fortunately, you have been able to figure out what's going wrong for you, as you noted below:


> 
>> The "RTSPClientConnection" object gets deleted if the call to "readSocket()" in RTSPServer::RTSPClientConnection::incomingRequestHandler1()" (line 786 of "RTSPServer.cpp) returns a value < 0 - which should happen when the remote (i.e., client) end of the TCP connection gets closed - i.e., when the RTSP client closes the TCP connection after sending the "TEARDOWN".
> Well, that's not happening for me. readSocket is always returning 0. Going one level deeper, I see recvfrom in readSocket does return -1 and err 113 after the client TEARs, but the "HACK to work around bugs in Linux and Windows" makes it a zero again.

That line of code was added - several years ago - to work around an alleged bug in at least some versions of Linux, whereby the call to "recvfrom()" would return 113 /*EHOSTUNREACH*/ on a *datagram* socket, which made no sense.  It's not clear whether this is still an issue...


> Ifdef'ing the whole hack for Cygwin seems to work "with no (evident (to me)) adverse effects", making the return value -1 too

In the next release of the software I'll probably just remove this line.  (If it happens to break for anyone, they'll just have to come back to us with good explanation why they think they still need it.)

Thanks for tracking down what was causing the problem for you.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140228/1321a427/attachment-0001.html>


More information about the live-devel mailing list