GNOME Bugzilla – Bug 651057
Sometimes when I start pipeline gstreamer crashes
Last modified: 2012-03-08 10:59:06 UTC
It crashes both when start from 'gst-launch' and crashes JVM when start from 'gstreamer-java' application. It also crashes both when sink is 'filesink' and when sink is 'autovideosink'. In most case it starts OK, but sometimes it faults. I suppose it can be because of buggy packet from camera, but I'm shure GStreamer should be fail safe despite of camera's bugs. I use gstreamer 0.10.34, plugins good 0.10.29. I installed 'gdb' packages for gstreamer, plugins-base, plugins-good and libglib2. Also I set 'GST_DEBUG=5'.
Created attachment 188583 [details] Output to stderr and stdout after crash Output to stderr and stdout after crash
Could you install debugging symbols for libc and gstreamer, and then get a stack trace with gdb? Can you reproduce this issue using a gst-launch-0.10 pipeline as well?
According to this article: http://live.gnome.org/GettingTraces I have installed 'dbg' packages for gstreamer, plugins-base, plugins-good and libglib2 (i.e. packages which names ends up with "dbg"). What I should install yet? What means "get stack trace with gdb"? What exactly means "reproduce this issue using a gst-launch-0.10 pipeline". Above I have written I experience the bug both from java-application and from command line using "gst-launch" utility.
Run the gst-launch commandline that leads to crashes with gdb --args gst-launch-0.10 yourpipeline [wait until it loads] run [wait until it crashes] thread apply all bt [press enter until nothing new is printed] And then copy the complete output into this bug.
The output of gdb after SIGSEGV: (gdb) run Starting program: /usr/bin/gst-launch-0.10 -v rtspsrc location=rtsp://192.168.0.105:7070 debug=true latency=0 \! rtpjpegdepay \! jpegdec \! autovideosink [Thread debugging using libthread_db enabled] Установка конвейера в состояние PAUSED... [New Thread 0xb75b7b70 (LWP 27922)] RTSP request message 0xbfffeac4 request line: method: 'OPTIONS' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: body: RTSP response message 0xbfffeaa8 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '1' key: 'Date', value: 'Fri, Jan 02 2004 00:49:21 GMT' key: 'Public', value: 'OPTIONS' key: 'Public', value: 'DESCRIBE' key: 'Public', value: 'SETUP' key: 'Public', value: 'PLAY' key: 'Public', value: 'TEARDOWN' body: length 0 RTSP request message 0xbfffeac4 request line: method: 'DESCRIBE' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: key: 'Accept', value: 'application/sdp' body: RTSP response message 0xbfffeaa8 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '2' key: 'Date', value: 'Fri, Jan 02 2004 00:49:21 GMT' key: 'Content-Base', value: 'rtsp://192.168.0.105:7070/' key: 'Content-Type', value: 'application/sdp' key: 'Content-Length', value: '279' body: length 280 00000000 (0x8119510): 76 3d 30 0d 0a 6f 3d 2d 20 31 30 37 33 30 30 34 v=0..o=- 1073004 00000010 (0x8119520): 35 36 31 30 30 30 34 30 30 30 30 20 31 20 49 4e 56100040000 1 IN 00000020 (0x8119530): 20 49 50 34 20 32 32 37 2e 30 2e 30 2e 34 0d 0a IP4 227.0.0.4.. 00000030 (0x8119540): 73 3d 53 65 73 73 69 6f 6e 20 73 74 72 65 61 6d s=Session stream 00000040 (0x8119550): 65 64 20 62 79 20 52 54 50 2f 52 54 53 50 20 73 ed by RTP/RTSP s 00000050 (0x8119560): 65 72 76 65 72 0d 0a 69 3d 49 50 20 45 6e 63 6f erver..i=IP Enco 00000060 (0x8119570): 64 65 72 20 52 54 50 20 73 74 72 65 61 6d 65 72 der RTP streamer 00000070 (0x8119580): 0d 0a 74 3d 30 20 30 0d 0a 61 3d 74 6f 6f 6c 3a ..t=0 0..a=tool: 00000080 (0x8119590): 49 50 20 45 6e 63 6f 64 65 72 20 52 54 50 20 73 IP Encoder RTP s 00000090 (0x81195a0): 74 72 65 61 6d 65 72 20 56 32 30 30 39 2e 30 32 treamer V2009.02 000000a0 (0x81195b0): 2e 30 35 0d 0a 61 3d 74 79 70 65 3a 62 72 6f 61 .05..a=type:broa 000000b0 (0x81195c0): 64 63 61 73 74 0d 0a 61 3d 63 6f 6e 74 72 6f 6c dcast..a=control 000000c0 (0x81195d0): 3a 2a 0d 0a 61 3d 72 61 6e 67 65 3a 6e 70 74 3d :*..a=range:npt= 000000d0 (0x81195e0): 6e 6f 77 2d 0d 0a 6d 3d 76 69 64 65 6f 20 35 30 now-..m=video 50 000000e0 (0x81195f0): 30 30 20 52 54 50 2f 41 56 50 20 32 36 0d 0a 63 00 RTP/AVP 26..c 000000f0 (0x8119600): 3d 49 4e 20 49 50 34 20 32 32 37 2e 30 2e 30 2e =IN IP4 227.0.0. 00000100 (0x8119610): 34 0d 0a 61 3d 63 6f 6e 74 72 6f 6c 3a 74 72 61 4..a=control:tra 00000110 (0x8119620): 63 6b 31 0d 0a 0d 0a 00 ck1..... sdp packet 0x8119178: version: '0' origin: username: '-' sess_id: '107300456100040000' sess_version: '1' nettype: 'IN' addrtype: 'IP4' addr: '227.0.0.4' session_name: 'Session streamed by RTP/RTSP server' information: 'IP Encoder RTP streamer' uri: '(NULL)' connection: nettype: '(NULL)' addrtype: '(NULL)' address: '(NULL)' ttl: '0' addr_number: '0' key: type: '(NULL)' data: '(NULL)' attributes: attribute 'tool' : 'IP Encoder RTP streamer V2009.02.05' attribute 'type' : 'broadcast' attribute 'control' : '*' attribute 'range' : 'npt=now-' medias: media 0: media: 'video' port: '5000' num_ports: '4294967295' proto: 'RTP/AVP' formats: format '26' information: '(NULL)' connections: nettype: 'IN' addrtype: 'IP4' address: '227.0.0.4' ttl: '0' addr_number: '0' key: type: '(NULL)' data: '(NULL)' attributes: attribute 'control' : 'track1' [New Thread 0xb6db6b70 (LWP 27923)] [New Thread 0xb65b5b70 (LWP 27924)] RTSP request message 0xbfffe944 request line: method: 'SETUP' uri: 'rtsp://192.168.0.105:7070/track1' version: '1.0' headers: key: 'Transport', value: 'RTP/AVP;multicast;client_port=52742-52743' body: RTSP response message 0xbfffe928 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '3' key: 'Date', value: 'Fri, Jan 02 2004 00:49:21 GMT' key: 'Transport', value: 'multicast;destination=227.0.0.4;port=5000-5001;ttl=16' key: 'Session', value: '38' body: length 0 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 0 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1) /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: timeout = 5000000 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink0: ttl = 16 Конвейер работает и не требует состояния PREROLL... Установка конвейера в состояние PLAYING... [New Thread 0xb5bffb70 (LWP 27925)] [New Thread 0xb53feb70 (LWP 27926)] /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: timeout = 0 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink: caps = application/x-rtcp RTSP request message 0xbfffeb74 request line: method: 'PLAY' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: key: 'Range', value: 'npt=now-' body: /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad3: caps = application/x-rtcp Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6db6b70 (LWP 27923)] 0xb7eee7cc in IA__g_value_init (value=0x8140000, g_type=135397736) at /build/buildd/glib2.0-2.24.1/gobject/gvalue.c:179 in /build/buildd/glib2.0-2.24.1/gobject/gvalue.c (gdb) thread apply all bt
+ Trace 227263
Thread 3 (Thread 0xb6db6b70 (LWP 27923))
This looks like memory corruption somewhere else... could you run the gst-launch commandline in valgrind and paste the output here? valgrind --track-origins=yes --trace-children=yes gst-launch-0.10 yourpipeline
I will try it later. One more output from gdb after hanging (i stopped hanging with "Ctrl+C"): (gdb) run Starting program: /usr/bin/gst-launch-0.10 -v rtspsrc location=rtsp://192.168.0.105:7070 debug=true latency=0 \! rtpjpegdepay \! jpegdec \! autovideosink [Thread debugging using libthread_db enabled] Установка конвейера в состояние PAUSED... [New Thread 0xb75b7b70 (LWP 28082)] RTSP request message 0xbfffeac4 request line: method: 'OPTIONS' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: body: RTSP response message 0xbfffeaa8 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '1' key: 'Date', value: 'Fri, Jan 02 2004 00:57:13 GMT' key: 'Public', value: 'OPTIONS' key: 'Public', value: 'DESCRIBE' key: 'Public', value: 'SETUP' key: 'Public', value: 'PLAY' key: 'Public', value: 'TEARDOWN' body: length 0 RTSP request message 0xbfffeac4 request line: method: 'DESCRIBE' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: key: 'Accept', value: 'application/sdp' body: RTSP response message 0xbfffeaa8 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '2' key: 'Date', value: 'Fri, Jan 02 2004 00:57:13 GMT' key: 'Content-Base', value: 'rtsp://192.168.0.105:7070/' key: 'Content-Type', value: 'application/sdp' key: 'Content-Length', value: '279' body: length 280 00000000 (0x8119510): 76 3d 30 0d 0a 6f 3d 2d 20 31 30 37 33 30 30 35 v=0..o=- 1073005 00000010 (0x8119520): 30 33 33 30 30 33 36 30 30 30 30 20 31 20 49 4e 03300360000 1 IN 00000020 (0x8119530): 20 49 50 34 20 32 32 37 2e 30 2e 30 2e 34 0d 0a IP4 227.0.0.4.. 00000030 (0x8119540): 73 3d 53 65 73 73 69 6f 6e 20 73 74 72 65 61 6d s=Session stream 00000040 (0x8119550): 65 64 20 62 79 20 52 54 50 2f 52 54 53 50 20 73 ed by RTP/RTSP s 00000050 (0x8119560): 65 72 76 65 72 0d 0a 69 3d 49 50 20 45 6e 63 6f erver..i=IP Enco 00000060 (0x8119570): 64 65 72 20 52 54 50 20 73 74 72 65 61 6d 65 72 der RTP streamer 00000070 (0x8119580): 0d 0a 74 3d 30 20 30 0d 0a 61 3d 74 6f 6f 6c 3a ..t=0 0..a=tool: 00000080 (0x8119590): 49 50 20 45 6e 63 6f 64 65 72 20 52 54 50 20 73 IP Encoder RTP s 00000090 (0x81195a0): 74 72 65 61 6d 65 72 20 56 32 30 30 39 2e 30 32 treamer V2009.02 000000a0 (0x81195b0): 2e 30 35 0d 0a 61 3d 74 79 70 65 3a 62 72 6f 61 .05..a=type:broa 000000b0 (0x81195c0): 64 63 61 73 74 0d 0a 61 3d 63 6f 6e 74 72 6f 6c dcast..a=control 000000c0 (0x81195d0): 3a 2a 0d 0a 61 3d 72 61 6e 67 65 3a 6e 70 74 3d :*..a=range:npt= 000000d0 (0x81195e0): 6e 6f 77 2d 0d 0a 6d 3d 76 69 64 65 6f 20 35 30 now-..m=video 50 000000e0 (0x81195f0): 30 30 20 52 54 50 2f 41 56 50 20 32 36 0d 0a 63 00 RTP/AVP 26..c 000000f0 (0x8119600): 3d 49 4e 20 49 50 34 20 32 32 37 2e 30 2e 30 2e =IN IP4 227.0.0. 00000100 (0x8119610): 34 0d 0a 61 3d 63 6f 6e 74 72 6f 6c 3a 74 72 61 4..a=control:tra 00000110 (0x8119620): 63 6b 31 0d 0a 0d 0a 00 ck1..... sdp packet 0x8119178: version: '0' origin: username: '-' sess_id: '107300503300360000' sess_version: '1' nettype: 'IN' addrtype: 'IP4' addr: '227.0.0.4' session_name: 'Session streamed by RTP/RTSP server' information: 'IP Encoder RTP streamer' uri: '(NULL)' connection: nettype: '(NULL)' addrtype: '(NULL)' address: '(NULL)' ttl: '0' addr_number: '0' key: type: '(NULL)' data: '(NULL)' attributes: attribute 'tool' : 'IP Encoder RTP streamer V2009.02.05' attribute 'type' : 'broadcast' attribute 'control' : '*' attribute 'range' : 'npt=now-' medias: media 0: media: 'video' port: '5000' num_ports: '4294967295' proto: 'RTP/AVP' formats: format '26' information: '(NULL)' connections: nettype: 'IN' addrtype: 'IP4' address: '227.0.0.4' ttl: '0' addr_number: '0' key: type: '(NULL)' data: '(NULL)' attributes: attribute 'control' : 'track1' [New Thread 0xb6db6b70 (LWP 28083)] [New Thread 0xb63ffb70 (LWP 28084)] RTSP request message 0xbfffe944 request line: method: 'SETUP' uri: 'rtsp://192.168.0.105:7070/track1' version: '1.0' headers: key: 'Transport', value: 'RTP/AVP;multicast;client_port=33452-33453' body: RTSP response message 0xbfffe928 status line: code: '200' reason: 'OK' version: '1.0' headers: key: 'CSeq', value: '3' key: 'Date', value: 'Fri, Jan 02 2004 00:57:13 GMT' key: 'Transport', value: 'multicast;destination=227.0.0.4;port=5000-5001;ttl=16' key: 'Session', value: '48' body: length 0 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 0 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1) /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2: timeout = 5000000 /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink0: ttl = 16 Конвейер работает и не требует состояния PREROLL... Установка конвейера в состояние PLAYING... Установка конвейера в состояние NULL... RTSP request message 0xbfffeba4 request line: method: 'TEARDOWN' uri: 'rtsp://192.168.0.105:7070/' version: '1.0' headers: body: RTSP response message 0xbfffeb88 status line: code: '400' reason: 'Bad Request' version: '1.0' headers: key: 'Date', value: 'Fri, Jan 02 2004 00:57:13 GMT' key: 'Allow', value: 'OPTIONS' key: 'Allow', value: 'DESCRIBE' key: 'Allow', value: 'SETUP' key: 'Allow', value: 'PLAY' key: 'Allow', value: 'TEARDOWN' body: length 0 [Thread 0xb75b7b70 (LWP 28082) exited] Освобождение конвейера... [Thread 0xb63ffb70 (LWP 28084) exited] [Thread 0xb6db6b70 (LWP 28083) exited] thread apply all bt ^C Program received signal SIGINT, Interrupt. 0xb7fe2430 in __kernel_vsyscall () (gdb) thread apply all bt
+ Trace 227264
Thread 1 (Thread 0xb7ad0b40 (LWP 28081))
I cannot reproduce bug with valgrind because it starts very long. As I said above the bug is occasional so it needs from me to try to start many times to emerge it.
Is there ready to use bash script which can: 1. Automatically run and kill valgrind if application started ok. 2. Repeat phase 1 until application crash? If so I could start continuous testing for a long period.
(In reply to comment #9) > Is there ready to use bash script which can: > 1. Automatically run and kill valgrind if application started ok. > 2. Repeat phase 1 until application crash? > > If so I could start continuous testing for a long period. not that I am aware of.
So beemaster, did you have any luck reproducing this issue with Valgrind?
I am not able to dig deep into valgrind so I temporarly frozen this issue of my application by looping the launching script. So if application crashes the script simply restart it. Maybe I return to this issue in the future but I can't predict certain period.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!