[Live-devel] Dead lock on 408 Request timeout

Alexander Tumarov alextai at servision.net
Sun Oct 4 00:16:23 PDT 2020


Hi,

You are receiving an additional response to Describe command that was
previously received completely ( CSeq: 4).
Your setup sent with CSeq: 5 but response came to  CSeq: 4 - Handler for
this was already completed.
Try to implement a timeout handler - I had an issue with different vendor
of cameras that were messing with sockets and it helped(although I dodn't
received 408 code but yes I was receiving unexpected responses).
I then raised the idea of setting timeout value for each command but Ross's
suggestion was to run a custom timer (via Live library) and track timeouts
- I implemented this and this worked.

Best regards,
Alexander.


On Fri, Oct 2, 2020 at 2:26 PM Eric Beuque <eric.beuque at jet1oeil.com> wrote:

> Hello,
>
> I'm facing a problem with a Samsung camera that sometimes answer a "408
> Request timeout", to a SETUP command, this lead to the RTSP stream to be in
> a dead lock state :
> - Nothing append in the callback of the sendSetupCommand (same problem
> using both TCP or UDP).
> - I also won't receive nothing in the callback given in to
> scheduleDelayedTask.
>
> I'm using Debian Buster which is using Livemedia 2018.11.26. Unfortunately
> i cannot upgrade the livemedia version to know if this will happen on
> latest version.
>
> I check the ChangeLog, but i don't see any modification that can fix this.
>
> I look in the RTSPClient.cpp file and i saw there is no handling for the
> 408 response, but i'm not able to know if something is missing or not (even
> in last version).
>
> Maybe, it's a bug in the camera RTSP server, but this block the client
> application.
>
> Is someone has an idea about this problem ?
>
> Thank you very much !
>
> Please find the logs I got :
>
> [Access::livemedia] Starting access to rtsp://admin:********@
> 192.168.1.3/onvif/profile2/media.smp
> [Access::livemedia] Start with transport TCP: 1
> [Access::livemedia] RTSP client created
> [Access::livemedia] Creating authenticator
> [Access::livemedia] Sending command OPTIONS
> [LibLiveMedia] Created new TCP socket 73 for connection
> [LibLiveMedia] Connecting to 192.168.1.3, port 554 on socket 73...
> [Access::livemedia] Starting event loop: 0
> [LibLiveMedia] ...remote connection opened
> [LibLiveMedia] Sending request: OPTIONS rtsp://
> 192.168.1.3/onvif/profile2/media.smp RTSP/1.0
> [LibLiveMedia] CSeq: 2
> [LibLiveMedia] User-Agent: LIVE555 Streaming Media v2018.11.26
> [LibLiveMedia]
> [LibLiveMedia] Received 230 new bytes of response data.
> [LibLiveMedia] Received a complete OPTIONS response:
> [LibLiveMedia] RTSP/1.0 401 Unauthorized
> [LibLiveMedia] CSeq: 2
> [LibLiveMedia] Date: Thu, 01 Oct 2020 22:42:57 GMT
> [LibLiveMedia] Expires: Thu, 01 Oct 2020 22:42:57 GMT
> [LibLiveMedia] Cache-Control: must-revalidate
> [LibLiveMedia] WWW-Authenticate: Digest realm="iPOLiS",
> nonce="D7F927DE0E1CFD4D568014FB31A4D1FF"
> [LibLiveMedia]
> [LibLiveMedia] Resending...
> [LibLiveMedia] Sending request: OPTIONS rtsp://
> 192.168.1.3/onvif/profile2/media.smp RTSP/1.0
> [LibLiveMedia] CSeq: 3
> [LibLiveMedia] Authorization: Digest username="admin", realm="iPOLiS",
> nonce="D7F927DE0E1CFD4D568014FB31A4D1FF", uri="rtsp://
> 192.168.1.3/onvif/profile2/media.smp",
> response="f7890ac2189e5c1597d8d9a3eff67689"
> [LibLiveMedia] User-Agent: LIVE555 Streaming Media v2018.11.26
> [LibLiveMedia]
> [LibLiveMedia] Received 224 new bytes of response data.
> [LibLiveMedia] Received a complete OPTIONS response:
> [LibLiveMedia] RTSP/1.0 200 OK
> [LibLiveMedia] CSeq: 3
> [LibLiveMedia] Date: Thu, 01 Oct 2020 22:43:10 GMT
> [LibLiveMedia] Expires: Thu, 01 Oct 2020 22:43:10 GMT
> [LibLiveMedia] Cache-Control: must-revalidate
> [LibLiveMedia] Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS,
> GET_PARAMETER, SET_PARAMETER
> [LibLiveMedia]
> [Access::livemedia] Got a OPTIONS description: DESCRIBE, SETUP, TEARDOWN,
> PLAY, PAUSE, OPTIONS, GET_PARAMETER, SET_PARAMETER
> [LibLiveMedia] Sending request: DESCRIBE rtsp://
> 192.168.1.3/onvif/profile2/media.smp RTSP/1.0
> [LibLiveMedia] CSeq: 4
> [LibLiveMedia] Authorization: Digest username="admin", realm="iPOLiS",
> nonce="D7F927DE0E1CFD4D568014FB31A4D1FF", uri="rtsp://
> 192.168.1.3/onvif/profile2/media.smp",
> response="1985e1946fc5962ee079257c9e7167b0"
> [LibLiveMedia] User-Agent: LIVE555 Streaming Media v2018.11.26
> [LibLiveMedia] Accept: application/sdp
> [LibLiveMedia]
> [LibLiveMedia] Received 1177 new bytes of response data.
> [LibLiveMedia] Received a complete DESCRIBE response:
> [LibLiveMedia] RTSP/1.0 200 OK
> [LibLiveMedia] CSeq: 4
> [LibLiveMedia] Date: Thu, 01 Oct 2020 22:43:11 GMT
> [LibLiveMedia] Expires: Thu, 01 Oct 2020 22:43:11 GMT
> [LibLiveMedia] Cache-Control: must-revalidate
> [LibLiveMedia] Content-Base: rtsp://192.168.1.3/onvif/profile2/media.smp
> [LibLiveMedia] Content-Type: application/sdp
> [LibLiveMedia] Content-Length: 866
> [LibLiveMedia] x-Accept-Retransmit: our-retransmit
> [LibLiveMedia] x-Accept-Dynamic-Rate: 1
> [LibLiveMedia]
> [LibLiveMedia] v=0
> [LibLiveMedia] o=- 0 0 IN IP4 192.168.1.250
> [LibLiveMedia] s=Media Presentation
> [LibLiveMedia] i=samsung
> [LibLiveMedia] c=IN IP4 0.0.0.0
> [LibLiveMedia] b=AS:7240
> [LibLiveMedia] t=0 0
> [LibLiveMedia] a=control:rtsp://192.168.1.3/onvif/profile2/media.smp
> [LibLiveMedia] a=range:npt=now-
> [LibLiveMedia] m=video 45344 RTP/AVP 98
> [LibLiveMedia] b=AS:7168
> [LibLiveMedia] a=rtpmap:98 H264/90000
> [LibLiveMedia] a=control:rtsp://
> 192.168.1.3/onvif/profile2/media.smp/trackID=v
> [LibLiveMedia] a=cliprect:0,0,1024,1280
> [LibLiveMedia] a=framesize:98 1280-1024
> [LibLiveMedia] a=framerate:10.0
> [LibLiveMedia] a=fmtp:98
> packetization-mode=1;profile-level-id=640032;sprop-parameter-sets=J2QAMq2EBUViuKxUcQgKisVxWKjiECSFITk8nyfk/k/J8nm5s00IEkKQnJ5Pk/J/J+T5PNzZphcqAUAIGmyAAAH0AAAnEHAAAA4AAAMAAOAABe91lA==,KP4Piw==
> [LibLiveMedia] m=audio 45346 RTP/AVP 0
> [LibLiveMedia] b=AS:64
> [LibLiveMedia] a=rtpmap:0 PCMU/8000
> [LibLiveMedia] a=control:rtsp://
> 192.168.1.3/onvif/profile2/media.smp/trackID=a
> [LibLiveMedia] a=recvonly
> [LibLiveMedia] m=application 45348 RTP/AVP 107
> [LibLiveMedia] b=AS:8
> [LibLiveMedia] a=rtpmap:107 vnd.onvif.metadata/90000
> [LibLiveMedia] a=control:rtsp://
> 192.168.1.3/onvif/profile2/media.smp/trackID=m
> [LibLiveMedia] a=recvonly
> [Access::livemedia] Got a SDP description : v=0
> o=- 0 0 IN IP4 192.168.1.250
> s=Media Presentation
> i=samsung
> c=IN IP4 0.0.0.0
> b=AS:7240
> t=0 0
> a=control:rtsp://192.168.1.3/onvif/profile2/media.smp
> a=range:npt=now-
> m=video 45344 RTP/AVP 98
> b=AS:7168
> a=rtpmap:98 H264/90000
> a=control:rtsp://192.168.1.3/onvif/profile2/media.smp/trackID=v
> a=cliprect:0,0,1024,1280
> a=framesize:98 1280-1024
> a=framerate:10.0
> a=fmtp:98
> packetization-mode=1;profile-level-id=640032;sprop-parameter-sets=J2QAMq2EBUViuKxUcQgKisVxWKjiECSFITk8nyfk/k/J8nm5s00IEkKQnJ5Pk/J/J+T5PNzZphcqAUAIGmyAAAH0AAAnEHAAAA4AAAMAAOAABe91lA==,KP4Piw==
> m=audio 45346 RTP/AVP 0
> b=AS:64
> a=rtpmap:0 PCMU/8000
> a=control:rtsp://192.168.1.3/onvif/profile2/media.smp/trackID=a
> a=recvonly
> m=application 45348 RTP/AVP 107
> b=AS:8
> a=rtpmap:107 vnd.onvif.metadata/90000
> a=control:rtsp://192.168.1.3/onvif/profile2/media.smp/trackID=m
> a=recvonly
> [Access::livemedia] Session name: Media Presentation
> [Access::livemedia] Using transport TCP
> [Access::livemedia] Initiate video/H264 subsession
> [Access::livemedia] Initiated the video/H264 subsession (client port 45344)
> [LibLiveMedia] Sending request: SETUP rtsp://
> 192.168.1.3/onvif/profile2/media.smp/trackID=v RTSP/1.0
> [LibLiveMedia] CSeq: 5
> [LibLiveMedia] Authorization: Digest username="admin", realm="iPOLiS",
> nonce="D7F927DE0E1CFD4D568014FB31A4D1FF", uri="rtsp://
> 192.168.1.3/onvif/profile2/media.smp",
> response="a09a1329a96a4f271446fe4957d60ce0"
> [LibLiveMedia] User-Agent: LIVE555 Streaming Media v2018.11.26
> [LibLiveMedia] Transport: RTP/AVP/TCP;unicast;interleaved=0-1
> [LibLiveMedia]
> [LibLiveMedia] Received 151 new bytes of response data.
> [LibLiveMedia] Received a complete (unknown) response:
> [LibLiveMedia] RTSP/1.0 408 Request Time-out
> [LibLiveMedia] CSeq: 4
> [LibLiveMedia] Date: Thu, 01 Oct 2020 22:44:11 GMT
> [LibLiveMedia] Expires: Thu, 01 Oct 2020 22:44:11 GMT
> [LibLiveMedia] Cache-Control: must-revalidate
> [LibLiveMedia]
>
>
> _______________________________________________
> 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/20201004/687afd18/attachment.htm>


More information about the live-devel mailing list