GNOME Bugzilla – Bug 595905
gst-rtsp-server is closing without "TEARDOWN" message
Last modified: 2010-05-28 11:22:45 UTC
I am using gst-rtsp-server as the streamin server and quicktime player as the client side player to stream the video.But in some times ,if u closes the client side player,the streaming server is stopping without showing any errors.In some times i am getting the TearDown message also.But just getting body: length 0 as the last gstmessage.which is in the response of PAUSE or TEARDOWN.
Following is the output that i got when i offed the client side player ----------------------------------------------------------------------- RTSP request message 0xb6901f78 request line: method: 'PAUSE' uri: 'rtsp://evidentiatest.dyndns.org:9000/video6.mp4' version: '1.0' headers: key: 'CSeq', value: '5' key: 'Session', value: 'qrmonwbetlwpemhd' key: 'User-Agent', value: 'QuickTime/7.6 (qtver=7.6;os=Windows NT 5.1Service Pack 2)' body: ** Message: client 0x81793b0: received a request ** Message: The uri needs to create the play list in handle_request rtsp://evidentiatest.dyndns.org:9000/video6.mp4 ** Message: The uri=uri->abspath= /video6.mp4 ** Message: /usr/local/movies/videos/video6.mp4 ** Message: ( filesrc location=/usr/local/movies/videos/video6.mp4 ** Message: going to state PAUSED media 0x8164ae8 ** Message: removing TCP 122.167.11.78 ** Message: removing TCP 122.167.11.78 ** Message: active 0 media 0x8164ae8 ** Message: state PAUSED media 0x8164ae8 ** Message: stats: position 0:00:08.200000000, duration 0:00:08.200000000 RTSP response message 0xbfce4fdc status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '5' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'qrmonwbetlwpemhd' body: length 0 RTSP request message 0xb6901f78 request line: method: 'TEARDOWN' uri: 'rtsp://evidentiatest.dyndns.org:9000/video6.mp4' version: '1.0' headers: key: 'CSeq', value: '6' key: 'Session', value: 'qrmonwbetlwpemhd' key: 'User-Agent', value: 'QuickTime/7.6 (qtver=7.6;os=Windows NT 5.1Service Pack 2)' body: ** Message: client 0x81793b0: received a request ** Message: The uri needs to create the play list in handle_request rtsp://evidentiatest.dyndns.org:9000/video6.mp4 ** Message: The uri=uri->abspath= /video6.mp4 ** Message: /usr/local/movies/videos/video6.mp4 ** Message: ( filesrc location=/usr/local/movies/videos/video6.mp4 ** Message: going to state NULL media 0x8164ae8 ** Message: active 0 media 0x8164ae8 ** Message: unprepare media 0x8164ae8 ** Message: stream 0xb69004d8 received caps (nil), NULL ** Message: stream 0xb6914420 received caps (nil), NULL ** Message: free session media 0xb6915ed8 ** Message: going to state NULL media 0x8164ae8 ** Message: active 0 media 0x8164ae8 ** Message: free session stream 0xb691d610 ** Message: free session stream 0xb691d1e8 RTSP response message 0xbfce4fc0 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '6' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'qrmonwbetlwpemhd' body: length 0 [root@evidentiatest streamingserver]#
what's the problem here? that log clearly shows a TEARDOWN.
ya got TEARDOWN. But when i closed the client side player,the server is also stopped!!
I downloaded the gst-rtsp-server from git,and once again used quicktime as the streaming client.After some times,the gst-server once again closes without showing any error message.I think itz a very critical issue with gst-rtsp-server. Once again i am posting the log here. the only change i made is the pipeline changing to stream mp4 video(mpeg4 and aac) in test-mp4.c gst_rtsp_media_factory_set_launch (factory, "( " "filesrc location=video.mp4 ! qtdemux name=qt " " qt. ! queue ! rtpmp4vpay name=pay0 pt=96 " " qt. ! queue ! rtpmp4gpay name=pay1 pt=98 " ")"); log ---------- ./test-mp4 video.mp4 ** Message: listening on port 8554 ** Message: added new client 0x8c57ef0 ip 10.0.0.210:15108 ** Message: attaching to context 0x8c54de0 ** Message: client 0x8c57ef0: tunnel start ** Message: client 0x8c57ef0: inserting 3bvYwmPaAAAPlFIAEQAAAA ** Message: added new client 0x8c57f20 ip 10.0.0.210:15364 ** Message: attaching to context 0x8c54de0 ** Message: client 0x8c57f20: tunnel complete ** Message: client 0x8c57f20: found tunnel 0x8c57ef0 ** Message: finalize client 0x8c57f20 RTSP request message 0x8d4ac00 request line: method: 'DESCRIBE' uri: 'rtsp://10.0.0.105:8554/test' version: '1.0' headers: key: 'CSeq', value: '1' key: 'Accept', value: 'application/sdp' key: 'Bandwidth', value: '56000' key: 'Accept-Language', value: 'en-US' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' body: ** Message: client 0x8c57ef0: received a request ** Message: found media 0x8d23b40 for url abspath /test ** Message: enter mainloop ** Message: found stream 0 with payloader 0x8d59040 ** Message: found stream 1 with payloader 0x8d5f068 ** Message: constructed media 0x8d64838 for url /test ** Message: preparing media 0x8d64838 ** Message: 0x8d64838: got message type tag ** Message: 0x8d64838: got message type tag ** Message: 0x8d64838: got message type tag ** Message: stream 0x8d66300 received caps 0x8da51c0, application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)MPEG4-GENERIC, encoding-params=(string)1, streamtype=(string)5, profile-level-id=(string)2, mode=(string)AAC-hbr, config=(string)1588, sizelength=(string)13, indexlength=(string)3, indexdeltalength=(string)3, ssrc=(guint)483183881, payload=(int)98, clock-base=(guint)2109366597, seqnum-base=(guint)1578 ** Message: stream 0x8d64780 received caps 0x8da4ae0, application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f50a041e1463, ssrc=(guint)1193192476, payload=(int)96, clock-base=(guint)3152590649, seqnum-base=(guint)62907 ** Message: 0x8d64838: got message type async-done ** Message: stats: position 0:00:00.000000000, duration 0:00:31.333333333 ** Message: object 0x8d64838 is prerolled RTSP response message 0xbfac1890 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '1' key: 'Content-Type', value: 'application/sdp' key: 'Content-Base', value: 'rtsp://10.0.0.105:8554/test/' key: 'Server', value: 'GStreamer RTSP server' body: length 577 00000000 (0x8dcb2c8): 76 3d 30 0d 0a 6f 3d 2d 20 31 31 38 38 33 34 30 v=0..o=- 1188340 00000010 (0x8dcb2d8): 36 35 36 31 38 30 38 38 33 20 31 20 49 4e 20 49 656180883 1 IN I 00000020 (0x8dcb2e8): 50 34 20 31 32 37 2e 30 2e 30 2e 31 0d 0a 73 3d P4 127.0.0.1..s= 00000030 (0x8dcb2f8): 53 65 73 73 69 6f 6e 20 73 74 72 65 61 6d 65 64 Session streamed 00000040 (0x8dcb308): 20 77 69 74 68 20 47 53 74 72 65 61 6d 65 72 0d with GStreamer. 00000050 (0x8dcb318): 0a 69 3d 72 74 73 70 2d 73 65 72 76 65 72 0d 0a .i=rtsp-server.. 00000060 (0x8dcb328): 65 3d 4e 4f 4e 45 0d 0a 74 3d 30 20 30 0d 0a 61 e=NONE..t=0 0..a 00000070 (0x8dcb338): 3d 74 6f 6f 6c 3a 47 53 74 72 65 61 6d 65 72 0d =tool:GStreamer. 00000080 (0x8dcb348): 0a 61 3d 74 79 70 65 3a 62 72 6f 61 64 63 61 73 .a=type:broadcas 00000090 (0x8dcb358): 74 0d 0a 61 3d 72 61 6e 67 65 3a 6e 70 74 3d 30 t..a=range:npt=0 000000a0 (0x8dcb368): 2e 30 30 30 30 30 30 2d 33 31 2e 33 33 33 33 33 .000000-31.33333 000000b0 (0x8dcb378): 33 0d 0a 6d 3d 76 69 64 65 6f 20 30 20 52 54 50 3..m=video 0 RTP 000000c0 (0x8dcb388): 2f 41 56 50 20 39 36 0d 0a 63 3d 49 4e 20 49 50 /AVP 96..c=IN IP 000000d0 (0x8dcb398): 34 20 31 32 37 2e 30 2e 30 2e 31 0d 0a 61 3d 72 4 127.0.0.1..a=r 000000e0 (0x8dcb3a8): 74 70 6d 61 70 3a 39 36 20 4d 50 34 56 2d 45 53 tpmap:96 MP4V-ES 000000f0 (0x8dcb3b8): 2f 39 30 30 30 30 0d 0a 61 3d 63 6f 6e 74 72 6f /90000..a=contro 00000100 (0x8dcb3c8): 6c 3a 73 74 72 65 61 6d 3d 30 0d 0a 61 3d 66 6d l:stream=0..a=fm 00000110 (0x8dcb3d8): 74 70 3a 39 36 20 70 72 6f 66 69 6c 65 2d 6c 65 tp:96 profile-le 00000120 (0x8dcb3e8): 76 65 6c 2d 69 64 3d 31 3b 63 6f 6e 66 69 67 3d vel-id=1;config= 00000130 (0x8dcb3f8): 30 30 30 30 30 31 62 30 30 31 30 30 30 30 30 31 000001b001000001 00000140 (0x8dcb408): 62 35 38 39 31 33 30 30 30 30 30 31 30 30 30 30 b589130000010000 00000150 (0x8dcb418): 30 30 30 31 32 30 30 30 63 34 38 64 38 38 30 30 00012000c48d8800 00000160 (0x8dcb428): 66 35 30 61 30 34 31 65 31 34 36 33 0d 0a 6d 3d f50a041e1463..m= 00000170 (0x8dcb438): 61 75 64 69 6f 20 30 20 52 54 50 2f 41 56 50 20 audio 0 RTP/AVP 00000180 (0x8dcb448): 39 38 0d 0a 63 3d 49 4e 20 49 50 34 20 31 32 37 98..c=IN IP4 127 00000190 (0x8dcb458): 2e 30 2e 30 2e 31 0d 0a 61 3d 72 74 70 6d 61 70 .0.0.1..a=rtpmap 000001a0 (0x8dcb468): 3a 39 38 20 4d 50 45 47 34 2d 47 45 4e 45 52 49 :98 MPEG4-GENERI 000001b0 (0x8dcb478): 43 2f 38 30 30 30 2f 31 0d 0a 61 3d 63 6f 6e 74 C/8000/1..a=cont 000001c0 (0x8dcb488): 72 6f 6c 3a 73 74 72 65 61 6d 3d 31 0d 0a 61 3d rol:stream=1..a= 000001d0 (0x8dcb498): 66 6d 74 70 3a 39 38 20 73 74 72 65 61 6d 74 79 fmtp:98 streamty 000001e0 (0x8dcb4a8): 70 65 3d 35 3b 70 72 6f 66 69 6c 65 2d 6c 65 76 pe=5;profile-lev 000001f0 (0x8dcb4b8): 65 6c 2d 69 64 3d 32 3b 6d 6f 64 65 3d 41 41 43 el-id=2;mode=AAC 00000200 (0x8dcb4c8): 2d 68 62 72 3b 63 6f 6e 66 69 67 3d 31 35 38 38 -hbr;config=1588 00000210 (0x8dcb4d8): 3b 73 69 7a 65 6c 65 6e 67 74 68 3d 31 33 3b 69 ;sizelength=13;i 00000220 (0x8dcb4e8): 6e 64 65 78 6c 65 6e 67 74 68 3d 33 3b 69 6e 64 ndexlength=3;ind 00000230 (0x8dcb4f8): 65 78 64 65 6c 74 61 6c 65 6e 67 74 68 3d 33 0d exdeltalength=3. 00000240 (0x8dcb508): 0a . RTSP request message 0x8d4ac00 request line: method: 'SETUP' uri: 'rtsp://10.0.0.105:8554/test/stream=0' version: '1.0' headers: key: 'CSeq', value: '2' key: 'Transport', value: 'RTP/AVP/TCP;unicast' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' key: 'Accept-Language', value: 'en-US' body: ** Message: client 0x8c57ef0: received a request ** Message: reusing cached media 0x8d64838 ** Message: manage new media 0x8d64838 in session 0x8dc8bd0 RTSP response message 0xbfac1874 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '2' key: 'Transport', value: 'RTP/AVP/TCP;unicast;interleaved=0-1;mode="PLAY"' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'mrkwkdsdjsxddavt' body: length 0 RTSP request message 0x8d4ac00 request line: method: 'SETUP' uri: 'rtsp://10.0.0.105:8554/test/stream=1' version: '1.0' headers: key: 'CSeq', value: '3' key: 'Transport', value: 'RTP/AVP/TCP;unicast' key: 'Session', value: 'mrkwkdsdjsxddavt' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' key: 'Accept-Language', value: 'en-US' body: ** Message: client 0x8c57ef0: received a request ** Message: watching session 0x8d96518 RTSP response message 0xbfac1874 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '3' key: 'Transport', value: 'RTP/AVP/TCP;unicast;interleaved=2-3;mode="PLAY"' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'mrkwkdsdjsxddavt' body: length 0 RTSP request message 0x8d4ac00 request line: method: 'PLAY' uri: 'rtsp://10.0.0.105:8554/test' version: '1.0' headers: key: 'CSeq', value: '4' key: 'Range', value: 'npt=0.000000-31.333333' key: 'Session', value: 'mrkwkdsdjsxddavt' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' body: ** Message: client 0x8c57ef0: received a request ** Message: seeking to 99:99:99.999999999 - 0:00:31.333332061 ** Message: done seeking 1 ** Message: prerolled again ** Message: stats: position 0:00:01.000000000, duration 0:00:31.333333333 RTSP response message 0xbfac1858 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '4' key: 'RTP-Info', value: 'url=rtsp://10.0.0.105:8554/test/stream=0;seq=62914;rtptime=3152590649, url=rtsp://10.0.0.105:8554/test/stream=1;seq=1579;rtptime=985665713' key: 'Range', value: 'npt=1.000000-31.333333' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'mrkwkdsdjsxddavt' ** Message: 0x8d64838: got message type async-done body: length 0 ** Message: going to state PLAYING media 0x8d64838 ** Message: adding TCP 10.0.0.210 ** Message: adding TCP 10.0.0.210 ** Message: active 2 media 0x8d64838 ** Message: state PLAYING media 0x8d64838 ** Message: 0x8d64838: got message type new-clock ** Message: 0x8d64838: got message type eos RTSP request message 0x8d4ac00 request line: method: 'PAUSE' uri: 'rtsp://10.0.0.105:8554/test' version: '1.0' headers: key: 'CSeq', value: '5' key: 'Session', value: 'mrkwkdsdjsxddavt' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' body: ** Message: client 0x8c57ef0: received a request ** Message: going to state PAUSED media 0x8d64838 ** Message: removing TCP 10.0.0.210 ** Message: removing TCP 10.0.0.210 ** Message: active 0 media 0x8d64838 ** Message: state PAUSED media 0x8d64838 ** Message: stats: position 0:00:31.300000000, duration 0:00:31.333333333 RTSP response message 0xbfac183c status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '5' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'mrkwkdsdjsxddavt' body: length 0 RTSP request message 0x8d4ac00 request line: method: 'TEARDOWN' uri: 'rtsp://10.0.0.105:8554/test' version: '1.0' headers: key: 'CSeq', value: '6' key: 'Session', value: 'mrkwkdsdjsxddavt' key: 'User-Agent', value: 'QTS (qtver=6.5.1;os=Windows NT 5.2)' body: ** Message: client 0x8c57ef0: received a request ** Message: going to state NULL media 0x8d64838 ** Message: active 0 media 0x8d64838 ** Message: unprepare media 0x8d64838 ** Message: stream 0x8d66300 received caps (nil), NULL ** Message: stream 0x8d64780 received caps (nil), NULL ** Message: free session media 0x8dc8bd0 ** Message: going to state NULL media 0x8d64838 ** Message: active 0 media 0x8d64838 ** Message: free session stream 0x8dc9ea0 ** Message: free session stream 0x8d9c398 RTSP response message 0xbfac1820 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '6' key: 'Server', value: 'GStreamer RTSP server' key: 'Session', value: 'mrkwkdsdjsxddavt' body: length 0 [root@localhost examples]# gedit test-mp4.c [root@localhost examples]#
I found that this crash is occur in the following function call from rtsp-client.c function: send_response() gst_rtsp_watch_send_message (client->watch, response, NULL);
i tracked the error. crashing is occur in this line, r = WRITE_SOCKET (fd, &buffer[*idx], left); calling from "write_bytes()" in gst-plugins-base
Reopening as per last comments
this is already fixed.(sigpipe signal handling) (duplication of #601772 )
*** This bug has been marked as a duplicate of bug 601772 ***