After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563729 - segfault in various elements
segfault in various elements
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: Sebastian Dröge (slomo)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-12-08 17:37 UTC by Christian Fredrik Kalager Schaller
Modified: 2009-04-29 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
valgrind log (1.35 KB, application/x-bzip2)
2009-04-23 20:31 UTC, Christian Fredrik Kalager Schaller
Details
updated log (70.94 KB, text/plain)
2009-04-24 09:43 UTC, Christian Fredrik Kalager Schaller
Details
test using mpegtsmux (67.58 KB, text/plain)
2009-04-24 11:43 UTC, Christian Fredrik Kalager Schaller
Details

Description Christian Fredrik Kalager Schaller 2008-12-08 17:37:09 UTC
Trying this pipeline:
gst-launch-0.10 -v filesrc location=/home/cschalle/Videos/sincity.mp4 ! decodebin name="decode" decode. ! ffmpegcolorspace ! x264enc ! queue ! flvmux name=mux ! gnomevfssink location=file:///tmp/test8.flv decode. ! audioconvert ! lame ! queue ! mux.

Getting this error output:
FREEING pipeline ...
Caught SIGSEGV accessing address 0x40
./any-to-flv: line 1: 32609 Killed                  gst-launch-0.10 -v filesrc location=/home/cschalle/Videos/sincity.mp4 ! decodebin name="decode" decode. ! ffmpegcolorspace ! x264enc ! queue ! flvmux
Comment 1 Sebastian Dröge (slomo) 2008-12-08 17:48:04 UTC
Could you get a backtrace of this crash? :)
Comment 2 Sebastian Dröge (slomo) 2008-12-08 17:51:51 UTC
Btw, h264 muxing seems to be quite broken ATM
Comment 3 Christian Fredrik Kalager Schaller 2008-12-08 18:04:22 UTC
The weird thing is that this gives me a selinux related backtrace

Thread 1 (Thread 0xb7fe48d0 (LWP 615))

  • #0 ??
    from /lib/libselinux.so.1
  • #1 ??
    from /lib/libselinux.so.1
  • #2 selinux_file_context_cmp
    from /lib/libselinux.so.1
  • #3 selinux_file_context_cmp
    from /lib/libselinux.so.1
  • #4 __gmon_start__
    from /usr/lib/nvidia/libGLcore.so.1
  • #5 ??
  • #6 selinux_file_context_cmp
    from /lib/libselinux.so.1
  • #7 selinux_file_context_cmp
    from /lib/libselinux.so.1
  • #8 ??

Comment 4 Sebastian Dröge (slomo) 2008-12-08 18:14:14 UTC
Hm... I remember seeing someone in #gnome-hackers complaining about random stuff segfaulting with a similar backtrace.

Could you try if this also happens with selinux disabled?
Comment 5 Christian Fredrik Kalager Schaller 2008-12-08 18:24:10 UTC
This is with selinux disabled....
Comment 6 Sebastian Dröge (slomo) 2009-04-23 07:30:36 UTC
I can't reproduce this here and flvmux is valgrind clean (x264 isn't though).

Can you still reproduce it and does this work:

gst-launch-0.10 -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! x264enc ! queue ! mux.video   flvmux name=mux ! filesink location=test.flv   audiotestsrc num-buffers=500 ! audioconvert ! lame ! queue ! mux.audio


Could you get a new backtrace and maybe a valgrind log?
Comment 7 Christian Fredrik Kalager Schaller 2009-04-23 09:04:57 UTC
The new pipeline also segfaults, although it do create a file and when viewing it I notice that video dies before audio. So this might be a x264 issue. Here is the console output:
gst-launch-0.10 -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! x264enc ! queue ! mux.video   flvmux name=mux ! filesink location=test.flv   audiotestsrc num-buffers=500 ! audioconvert ! lame ! queue ! mux.audio
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)320, height=(int)240
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, width=(int)320, height=(int)240, framerate=(fraction)30/1, codec_data=(buffer)014d4015ffe10017674d401592540a0fd80880000003008000001e478b175001000468ee3c80
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, width=(int)320, height=(int)240
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)64, rate=(int)44100, channels=(int)1
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)64, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, width=(int)320, height=(int)240, framerate=(fraction)30/1, codec_data=(buffer)014d4015ffe10017674d401592540a0fd80880000003008000001e478b175001000468ee3c80
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, width=(int)320, height=(int)240, framerate=(fraction)30/1, codec_data=(buffer)014d4015ffe10017674d401592540a0fd80880000003008000001e478b175001000468ee3c80
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:video: caps = video/x-h264, width=(int)320, height=(int)240, framerate=(fraction)30/1, codec_data=(buffer)014d4015ffe10017674d401592540a0fd80880000003008000001e478b175001000468ee3c80
/GstPipeline:pipeline0/GstLame:lame0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)1, rate=(int)44100
/GstPipeline:pipeline0/GstLame:lame0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)1
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)1, rate=(int)44100
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)1, rate=(int)44100
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:audio: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, channels=(int)1, rate=(int)44100
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:src: caps = video/x-flv
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-flv
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 844619359 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:video: caps = NULL
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:audio: caps = NULL
/GstPipeline:pipeline0/GstFlvMux:mux.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstLame:lame0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstLame:lame0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
Caught SIGSEGV accessing address 0x48
Killed


Comment 8 Christian Fredrik Kalager Schaller 2009-04-23 20:31:19 UTC
Created attachment 133211 [details]
valgrind log
Comment 9 Sebastian Dröge (slomo) 2009-04-24 08:31:06 UTC
Something went wrong there it seems...
Please retry with

G_SLICE=always-malloc valgrind --trace-children=yes
gst-launch-0.10 -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! x264enc !
queue ! mux.video   flvmux name=mux ! filesink location=test.flv   audiotestsrc
num-buffers=500 ! audioconvert ! lame ! queue ! mux.audio &> log


If you're in an uninstalled GIT environment replace gst-launch-0.10 with /path/to/gitclones/gstreamer/tools/.libs/gst-launch-0.10
Comment 10 Christian Fredrik Kalager Schaller 2009-04-24 09:43:04 UTC
Created attachment 133246 [details]
updated log
Comment 11 Christian Fredrik Kalager Schaller 2009-04-24 11:43:09 UTC
Created attachment 133251 [details]
test using mpegtsmux
Comment 12 Sebastian Dröge (slomo) 2009-04-25 05:00:37 UTC
Ok, so essentially this is a crash that happens when decoding and encoding your video...

Does it also crash if:
a) You don't use a muxer and instead link the encoders to fakesinks?
b) If you don't encode but simply link the two decodebin pads to fakesinks?
Comment 13 Christian Fredrik Kalager Schaller 2009-04-27 10:12:05 UTC
Hmm, ser ut til at denne pipelinen ogsaa crasher, 

gst-launch-0.10 -v videotestsrc num-buffers=100 ! ffmpegcolorspace ! x264enc ! mux fakesink name=mux ! filesink location=test.flv   audiotestsrc num-buffers=500 ! audioconvert ! lame ! mux
0:00:00.103808723  4475  0x8cfc050 ERROR         GST_PIPELINE ./grammar.y:571:_gst_parse_yyparse: no element "mux"
0:00:00.113843448  4475  0x8cfc050 ERROR         GST_PIPELINE ./grammar.y:571:_gst_parse_yyparse: no element "mux"
0:00:00.157609835  4475  0x8cfc050 ERROR         GST_PIPELINE ./grammar.y:524:gst_parse_perform_link: could not link mux to filesink0
WARNING: erroneous pipeline: no element "mux"
Caught SIGSEGV accessing address 0x48
Killed

Comment 14 Sebastian Dröge (slomo) 2009-04-27 10:17:04 UTC
Essentially that means that x264 is broken for you. I bet you'll get the same crash if you use ffmpeg or mencoder to encode something with x264... can you confirm this and close the bug as NOTGNOME then? :)
Comment 15 Christian Fredrik Kalager Schaller 2009-04-28 09:58:04 UTC
Hmm, I actually get this segfault with gst-inspect also with all ffmpeg plugins in addition to x264. All other plugins I randomly tested are fine though.

It is worth pointing out that these plugins do work when I use them in Transmageddon.
Comment 16 Christian Fredrik Kalager Schaller 2009-04-29 16:02:42 UTC
this is likely to be x264 and ffmpeg doing weird assembly stuff making the selinux library unhappy. Closing as notgnome aka notgstreamer :)