[Live-devel] windows winsock error 10038

Serge.Grondin at miranda.com Serge.Grondin at miranda.com
Tue Jun 18 07:31:25 PDT 2013


Hi Ross and Andrey,

I got the exact same bug on my Linux server,  a random "bad file
descriptor" error that kills my server every 24 hours or so using RTP over
TCP streaming.  Hopefully I have an auto restart mechanism that respawn my
server but that's not really great solution.  Same thing for me, I have not
changed anything in the code and I don't even close or open any TCP socket
(and I don't play with background handling).  Last week I decided to take a
deeper look into it and I think I have found a track but I don't have a
good solution for it.  That thing is really hard to reproduce but I think
the best way to get it is to kill the client process listening to a TCP
stream connected to live555 server (and clients reuse the same source
flag).  On my server the problem seems to come when the connection between
the server and the client is lost while streaming TCP for a long time.

The problem I found is in RTPInterface.cpp file

-> SocketDescriptor::tcpReadHandler1 line 422
If readSocket fails (-1) it triggers a deletion of the SocketDescriptor
object

However this is leaving a dangling pointer in the HashTable in RTPInterface
(lookupSocketDescriptor) while the "OnDemandServerMediaSubsession" is still
alive.  Then a new client comes, RTPInterface::startNetworkReading is
called and "registerRTPInterface" is called again on the dead
SocketDescriptor, registering the dead socket for background handling...
boom!
You get the file descriptor error and the server dies.

I found it by adding a few "printf" in this area, I suggest you should do
the same.  I don't have a clear idea how to fix that but I'm happy I'm not
the only one getting it.

Thanks!


Serge Grondin
Miranda Technnologies




From:	Ross Finlayson <finlayson at live555.com>
To:	LIVE555 Streaming Media - development & use
            <live-devel at ns.live555.com>,
Date:	2013-06-18 04:18
Subject:	Re: [Live-devel] windows winsock error 10038
Sent by:	live-devel-bounces at ns.live555.com



      Thanks for the quick reply. However, the error occurs even if the
      test code testOnDemandRTSPServer reuseFirstSource set to True. I have
      not changed anything in the code, except the reuseFirstSource.

If that's the case, then unfortunately you're going to have to track down
the specific problem in our code that is causing this - because nobody else
has reported seeing this issue.

(As always, I assume that you're using the latest version of the LIVE555
software - the only version that we support.)


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

DISCLAIMER:

Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.

Thank You.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130618/7de2b8df/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130618/7de2b8df/attachment-0001.gif>


More information about the live-devel mailing list