Hi Ross,
I managed to track the cause of the disconnection down.
It seems that the later connection's RR packets are not handled by
RTPTransmissionStats::noteIncomingRR but by the
RTSPServer::RTSPClientSession::incomingRequestHandler1.
Every RR fills the buffer up and when the buffer is finally full the RTSP
server terminates the client connection.
Still don't know what exactly is causing the system to get into the error state.
Maybe this will give you some indication of what's going wrong since you know
the system so in depth.
I am using the latest version of the liveMedia code: 2008/10/07
The problem occurs only when the server runs on a Linux Ubuntu system. I'm not
sure if it will surface in other Linux distros.
To replicate do the following:
Setup:
Client: OpenRtsp (sitting on another machine)
Platform: Linux Ubuntu Hardy and Windows XP
Transport: TCP
Server:
live555 Dynamic RTSP Server (MediaServer)
Platform: Linux Ubuntu Hardy
Platform: Windows XP: Bug does NOT occur when the server is running on this
platform
Steps:
1) Add some debug output to
RTSPServer::RTSPClientSession::incomingRequestHandler1 to show that the handler
was called. This must be before the
"if (!endOfMsg) return;" statement. (once the system is in this erroneous state
the method exits at this point)
2) Compile the liveMedia library with DEBUG_RR.
3) Run the server
4) Connect the first openRtsp client over tcp. At this point you'll see the RR
debug output on the console. Let it run for about a minute or so. (The problem
only seems to occur once the system has been running for a while: related to
rtcp timeout maybe?)
5) Disconnect the openRtsp client.
6) Reconnect the client: if the RR output shows up on the server console, let
the openRtsp client run for a couple of seconds.
7) Repeat 5 - 6 until after connection you see the
RTSPServer::RTSPClientSession::incomingRequestHandler1 output instead of the RR
output.
At this point the RTSPClientSession handler is used for each RR packet and when
the buffer is full, the connection is terminated.
In our system we obviously don't break the server following these steps. Our
client connects only twice, once to sniff packets to obtain information about
the media type and the second time to stream the media type.
This "double-connection" is enough for the server to go into this error state
and disconnect our clients most of the time.
I've attached both the Windows and the Linux server output. Not sure if that
helps track the bug down?
Any ideas?
Regards,
Ralf
--
This message is subject to the CSIR's copyright terms and conditions, e-mail
legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at
http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their
support.
[EMAIL PROTECTED]:~/RTVC/3rdParty/LiveMedia/live/mediaServer$
./live555MediaServer
LIVE555 Media Server
version 0.19 (LIVE555 Streaming Media library version 2008.10.07).
Play streams from this server using the URL
rtsp://146.64.28.242:8554/<filename>
where <filename> is a file present in the current directory.
Each file's type is inferred from its name suffix:
".aac" => an AAC Audio (ADTS format) file
".amr" => an AMR Audio file
".m4e" => a MPEG-4 Video Elementary Stream file
".mp3" => a MPEG-1 or 2 Audio file
".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file
".ts" => a MPEG Transport Stream file
(a ".tsx" index file - if present - provides server 'trick play'
support)
".wav" => a WAV Audio file
See http://www.live555.com/mediaServer/ for additional documentation.
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 129 bytes:OPTIONS
rtsp://146.64.28.242:8554/LongWav.wav RTSP/1.0
CSeq: 1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "OPTIONS", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, Oct 30 2008 08:42:59 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 155 bytes:DESCRIBE
rtsp://146.64.28.242:8554/LongWav.wav RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "DESCRIBE", urlPreSuffix "",
urlSuffix "LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Oct 30 2008 08:42:59 GMT
Content-Base: rtsp://146.64.28.242:8554/LongWav.wav/
Content-Type: application/sdp
Content-Length: 387
v=0
o=- 1225356179036897 1 IN IP4 146.64.28.242
s=WAV Audio Stream, streamed by the LIVE555 Media Server
i=LongWav.wav
t=0 0
a=tool:LIVE555 Streaming Media v2008.10.07
a=type:broadcast
a=control:*
a=range:npt=0-465.000
a=x-qt-text-nam:WAV Audio Stream, streamed by the LIVE555 Media Server
a=x-qt-text-inf:LongWav.wav
m=audio 0 RTP/AVP 10
c=IN IP4 0.0.0.0
a=control:track1
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 182 bytes:SETUP
rtsp://146.64.28.242:8554/LongWav.wav/track1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "SETUP", urlPreSuffix "LongWav.wav",
urlSuffix "track1"
sending response: RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Oct 30 2008 08:42:59 GMT
Transport:
RTP/AVP/TCP;unicast;destination=146.64.19.253;source=146.64.28.242;interleaved=0-1
Session: 1
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 165 bytes:PLAY
rtsp://146.64.28.242:8554/LongWav.wav/ RTSP/1.0
CSeq: 4
Session: 1
Range: npt=0.000-465.000
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "PLAY", urlPreSuffix "LongWav.wav",
urlSuffix ""
sending response: RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Oct 30 2008 08:42:59 GMT
Range: npt=0.000-465.000
Session: 1
RTP-Info:
url=rtsp://146.64.28.242:8554/LongWav.wav/track1;seq=23272;rtptime=1734260656
[0x80d4e58]saw incoming RTCP packet (from address 2.0.0.0, port 60863)
81c90007 c3f0b656 3ecedb68 00000000 00005bf9 0000001d 00000000 00000000
81ca0004 c3f0b656 01067562 756e7475 00000000
RR
Adding new entry for SSRC c3f0b656 in RTPTransmissionStatsDB
RTCP RR data (received at 1225356181.272167): lossStats 0x00000000,
lastPacketNumReceived 0x00005bf9, jitter 0x0000001d, lastSRTime 0x00000000,
diffSR_RRTime 0x00000000
=> round-trip delay: 0x0000 (== 0.000000 seconds)
validated RTCP subpacket (type 2): 1, 201, 0, 0xc3f0b656
UNSUPPORTED TYPE(0xca)
validated RTCP subpacket (type 2): 1, 202, 12, 0xc3f0b656
validated entire RTCP packet
[0x80d4e58]saw incoming RTCP packet (from address 2.0.0.0, port 60863)
81c90007 c3f0b656 3ecedb68 00000000 00005ee6 00000036 f21a8c22 0000a09a
81ca0004 c3f0b656 01067562 756e7475 00000000
RR
................................................................................
(Second Session ...)
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 129 bytes:OPTIONS
rtsp://146.64.28.242:8554/LongWav.wav RTSP/1.0
CSeq: 1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "OPTIONS", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, Oct 30 2008 08:44:39 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 155 bytes:DESCRIBE
rtsp://146.64.28.242:8554/LongWav.wav RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "DESCRIBE", urlPreSuffix "",
urlSuffix "LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Oct 30 2008 08:44:39 GMT
- Show quoted text -
Content-Base: rtsp://146.64.28.242:8554/LongWav.wav/
Content-Type: application/sdp
Content-Length: 387
v=0
o=- 1225356179036897 1 IN IP4 146.64.28.242
s=WAV Audio Stream, streamed by the LIVE555 Media Server
i=LongWav.wav
t=0 0
a=tool:LIVE555 Streaming Media v2008.10.07
a=type:broadcast
a=control:*
a=range:npt=0-465.000
a=x-qt-text-nam:WAV Audio Stream, streamed by the LIVE555 Media Server
a=x-qt-text-inf:LongWav.wav
m=audio 0 RTP/AVP 10
c=IN IP4 0.0.0.0
a=control:track1
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 182 bytes:SETUP
rtsp://146.64.28.242:8554/LongWav.wav/track1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "SETUP", urlPreSuffix "LongWav.wav",
urlSuffix "track1"
sending response: RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Oct 30 2008 08:44:40 GMT
Transport:
RTP/AVP/TCP;unicast;destination=146.64.19.253;source=146.64.28.242;interleaved=0-1
Session: 2
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 165 bytes:PLAY
rtsp://146.64.28.242:8554/LongWav.wav/ RTSP/1.0
CSeq: 4
Session: 2
Range: npt=0.000-465.000
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "PLAY", urlPreSuffix "LongWav.wav",
urlSuffix ""
sending response: RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Oct 30 2008 08:44:40 GMT
Range: npt=0.000-465.000
Session: 2
RTP-Info:
url=rtsp://146.64.28.242:8554/LongWav.wav/track1;seq=21687;rtptime=3781527775
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 1 bytes:$
RTSPClientSession[0x80cf630]::incomingRequestHandler1() read 55 bytes:
D:\RTVC2\build\VC8\debug>MediaServerD.exe
LIVE555 Media Server
version 0.19 (LIVE555 Streaming Media library version 2008.10.07).
Play streams from this server using the URL
rtsp://146.64.19.235/<filename>
where <filename> is a file present in the current directory.
Each file's type is inferred from its name suffix:
".aac" => an AAC Audio (ADTS format) file
".amr" => an AMR Audio file
".m4e" => a MPEG-4 Video Elementary Stream file
".mp3" => a MPEG-1 or 2 Audio file
".mpg" => a MPEG-1 or 2 Program Stream (audio+video) file
".ts" => a MPEG Transport Stream file
(a ".tsx" index file - if present - provides server 'trick play'
support)
".wav" => a WAV Audio file
See http://www.live555.com/mediaServer/ for additional documentation.
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 124 bytes:OPTIONS rt
sp://146.64.19.235/LongWav.wav RTSP/1.0
CSeq: 1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "OPTIONS", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, Oct 30 2008 08:31:02 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 150 bytes:DESCRIBE r
tsp://146.64.19.235/LongWav.wav RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "DESCRIBE", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Oct 30 2008 08:31:02 GMT
Content-Base: rtsp://146.64.19.235/LongWav.wav/
Content-Type: application/sdp
Content-Length: 381
v=0
o=- 7895258496 1 IN IP4 146.64.19.235
s=WAV Audio Stream, streamed by the LIVE555 Media Server
i=LongWav.wav
t=0 0
a=tool:LIVE555 Streaming Media v2008.10.07
a=type:broadcast
a=control:*
a=range:npt=0-465.000
a=x-qt-text-nam:WAV Audio Stream, streamed by the LIVE555 Media Server
a=x-qt-text-inf:LongWav.wav
m=audio 0 RTP/AVP 10
c=IN IP4 0.0.0.0
a=control:track1
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 177 bytes:SETUP rtsp
://146.64.19.235/LongWav.wav/track1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "SETUP", urlPreSuffix "LongWav.wav", u
rlSuffix "track1"
sending response: RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Oct 30 2008 08:31:02 GMT
Transport: RTP/AVP/TCP;unicast;destination=146.64.19.253;source=146.64.19.235;in
terleaved=0-1
Session: 1
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 160 bytes:PLAY rtsp:
//146.64.19.235/LongWav.wav/ RTSP/1.0
CSeq: 4
Session: 1
Range: npt=0.000-465.000
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
RTSPClientSession[003A5D88]::incomingRequestHandler1() #1:Before end of message
fBytesAlreadySeen: 160 fRequestBufferBytesLeft: 9840 request buffer size: 10000!
parseRTSPRequestString() returned cmdName "PLAY", urlPreSuffix "LongWav.wav", ur
lSuffix ""
sending response: RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Oct 30 2008 08:31:02 GMT
Range: npt=0.000-465.000
Session: 1
RTP-Info: url=rtsp://146.64.19.235/LongWav.wav/track1;seq=20797;rtptime=7607
Adding new entry for SSRC 2209b01c in RTPTransmissionStatsDB
RTCP RR data (received at 7898.433549): lossStats 0x00000000, lastPacketNumRecei
ved 0x000052ab, jitter 0x0000015b, lastSRTime 0x9d585df1, diffSR_RRTime 0x0001e3
79
=> round-trip delay: 0x2d93 (== 0.178024 seconds)
RTCP RR data (received at 7902.867916): lossStats 0x00000000, lastPacketNumRecei
ved 0x000054ef, jitter 0x0000015b, lastSRTime 0x9d5e89ee, diffSR_RRTime 0x000054
25
=> round-trip delay: 0x001d (== 0.000443 seconds)
RTCP RR data (received at 7907.787873): lossStats 0x00000000, lastPacketNumRecei
ved 0x00005746, jitter 0x0000015e, lastSRTime 0x9d62a4e9, diffSR_RRTime 0x0000fb
3d
=> round-trip delay: 0x298c (== 0.162292 seconds)
................................................................................
(Second Session Windows...)
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 124 bytes:OPTIONS rt
sp://146.64.19.235/LongWav.wav RTSP/1.0
CSeq: 1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "OPTIONS", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 1
Date: Thu, Oct 30 2008 08:40:38 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 150 bytes:DESCRIBE r
tsp://146.64.19.235/LongWav.wav RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "DESCRIBE", urlPreSuffix "", urlSuffix
"LongWav.wav"
sending response: RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Oct 30 2008 08:40:38 GMT
Content-Base: rtsp://146.64.19.235/LongWav.wav/
Content-Type: application/sdp
Content-Length: 381
v=0
o=- 7895258496 1 IN IP4 146.64.19.235
s=WAV Audio Stream, streamed by the LIVE555 Media Server
i=LongWav.wav
t=0 0
a=tool:LIVE555 Streaming Media v2008.10.07
a=type:broadcast
a=control:*
a=range:npt=0-465.000
a=x-qt-text-nam:WAV Audio Stream, streamed by the LIVE555 Media Server
a=x-qt-text-inf:LongWav.wav
m=audio 0 RTP/AVP 10
c=IN IP4 0.0.0.0
a=control:track1
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 177 bytes:SETUP rtsp
://146.64.19.235/LongWav.wav/track1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "SETUP", urlPreSuffix "LongWav.wav", u
rlSuffix "track1"
sending response: RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Oct 30 2008 08:40:38 GMT
Transport: RTP/AVP/TCP;unicast;destination=146.64.19.253;source=146.64.19.235;in
terleaved=0-1
Session: 2
RTSPClientSession[003A5D88]::incomingRequestHandler1() read 160 bytes:PLAY rtsp:
//146.64.19.235/LongWav.wav/ RTSP/1.0
CSeq: 4
Session: 2
Range: npt=0.000-465.000
User-Agent: ./openRTSP (LIVE555 Streaming Media v2008.09.02)
parseRTSPRequestString() returned cmdName "PLAY", urlPreSuffix "LongWav.wav", ur
lSuffix ""
sending response: RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Oct 30 2008 08:40:38 GMT
Range: npt=0.000-465.000
Session: 2
RTP-Info: url=rtsp://146.64.19.235/LongWav.wav/track1;seq=12357;rtptime=21474836
99
Adding new entry for SSRC 7ef9bfe5 in RTPTransmissionStatsDB
RTCP RR data (received at 8474.897089): lossStats 0x00000000, lastPacketNumRecei
ved 0x000031af, jitter 0x0000015e, lastSRTime 0x9f9906a2, diffSR_RRTime 0x0001de
df
=> round-trip delay: 0x0027 (== 0.000595 seconds)
RTCP RR data (received at 8480.818931): lossStats 0x00000000, lastPacketNumRecei
ved 0x0000348c, jitter 0x0000015c, lastSRTime 0x9f9f2f1d, diffSR_RRTime 0x000186
3d
=> round-trip delay: 0x1c4b (== 0.110519 seconds)
RTCP RR data (received at 8485.747557): lossStats 0x00000000, lastPacketNumRecei
ved 0x000036f0, jitter 0x00000158, lastSRTime 0x9fa55798, diffSR_RRTime 0x000035
aa
=> round-trip delay: 0x321e (== 0.195770 seconds)
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel