Discussion:
live555MediaServer segmentation violation when severals RTSP client access to the same stream.
PROMONET Michel
2014-10-16 13:30:11 UTC
Permalink
Hi Ross,

Since a couple of months live555MediaServer exit times to times with a segmentation violation when it is used by several client that ask for the same file.
One of the back trace is :
#0 ServerMediaSession::duration (this=0x131a500) at ServerMediaSession.cpp:177
#1 0x0000000000412615 in ServerMediaSession::generateSDPDescription (this=0x131a500) at ServerMediaSession.cpp:243
#2 0x00000000004074f6 in RTSPServer::RTSPClientConnection::handleCmd_DESCRIBE (this=0x130c460,
urlPreSuffix=<value optimized out>, urlSuffix=<value optimized out>,
fullRequestStr=0x130c48c "DESCRIBE rtsp://127.0.0.1:8554/video.264 RTSP/1.0\r\nCSeq: 3\r\nUser-Agent: RTSP client (LIVE555 Streaming Media v2013.02.11)\r\nAccept: application/sdp\r\n\r\n") at RTSPServer.cpp:526
#3 0x0000000000405a30 in RTSPServer::RTSPClientConnection::handleRequestBytes (this=0x130c460, newBytesRead=150)
at RTSPServer.cpp:990
#4 0x00000000004063c0 in RTSPServer::RTSPClientConnection::incomingRequestHandler1 (this=<value optimized out>)
at RTSPServer.cpp:790
#5 0x00000000004063cf in RTSPServer::RTSPClientConnection::incomingRequestHandler (instance=<value optimized out>)
at RTSPServer.cpp:783
#6 0x000000000044a762 in BasicTaskScheduler::SingleStep (this=0x1199010, maxDelayTime=<value optimized out>)
at BasicTaskScheduler.cpp:171
#7 0x000000000044b8d5 in BasicTaskScheduler0::doEventLoop (this=0x1199010, watchVariable=0x0) at BasicTaskScheduler0.cpp:80
#8 0x00000000004020bb in main (argc=<value optimized out>, argv=<value optimized out>) at live555MediaServer.cpp:89
Others are similars accessing to a ServerMediaSession, sometimes processing SETUP.

I tried to comment out in DynamicRTSPServer.cpp removing of existing sessions (because I suspect it destroy ServerMediaSession that are still used by others RTSP connections)
} else {
if (smsExists && isFirstLookupInSession) {
// Remove the existing "ServerMediaSession" and create a new one, in case the underlying
// file has changed in some way:
// removeServerMediaSession(sms);
// sms = NULL;
}

if (sms == NULL) {
sms = createNewSMS(envir(), streamName, fid);
addServerMediaSession(sms);
}

fclose(fid);
return sms;
}

Obviously this change the behavior because it does not re-read the file, but with this modification it doesnot seems to crash anymore.

Is there some restrictions to access several times to the same stream provided by live555MediaServer ?

Thanks again for your support.

Michel.

[@@ THALES GROUP INTERNAL @@]
Ross Finlayson
2014-10-16 23:16:41 UTC
Permalink
Aha! You've run into a rare 'race condition'. Thanks for reporting this.

I've just installed a new version (2014.10.16) of the "LIVE555 Streaming Media" software that should fix this.

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
PROMONET Michel
2014-10-17 10:47:26 UTC
Permalink
Hi Ross,

On one server, before your modification, it was crashing more than once per hour.
With this new version it seems ok.

Many Thanks,

Michel.

[@@ THALES GROUP INTERNAL @@]

De : live-devel [mailto:live-devel-***@ns.live555.com] De la part de Ross Finlayson
Envoyé : vendredi 17 octobre 2014 01:17
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] live555MediaServer segmentation violation when severals RTSP client access to the same stream.

Aha! You've run into a rare 'race condition'. Thanks for reporting this.

I've just installed a new version (2014.10.16) of the "LIVE555 Streaming Media" software that should fix this.

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

Loading...