GNOME Bugzilla – Bug 771092
avenc: Got Caught SIGSEGV when using avenc_xxx
Last modified: 2016-09-30 10:49:51 UTC
When tried to use below command line: gst-launch-1.0 -e videotestsrc ! avenc_h263 ! fakesink got crash: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Caught SIGSEGV The same phenomenon could be observed when using avenc_mpeg4 / avenc_flv .... but with command line: gst-launch-1.0 -e videotestsrc ! theoraenc ! fakesink It works fine. It seems there is something wrong with avenc_xxx plugin
Which version on which platform is that? Can you get a backtrace of all threads when it crashes?
The gst-libav version is 1.8.1, on arm cortex-a9 platoform I got some backtrace below: root@imx6qdlsolo:~# gdb gst-launch-1.0 2015 GNU gdb (GDB) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-poky-linux-gnueabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gst-launch-1.0...done. Attaching to program: /usr/bin/gst-launch-1.0, process 2015 Reading symbols from /usr/lib/libgstreamer-1.0.so.0...done. Reading symbols from /usr/lib/libgobject-2.0.so.0...done. Reading symbols from /usr/lib/libglib-2.0.so.0...done. Reading symbols from /lib/libpthread.so.0...Reading symbols from /lib/.debug/libpthread-2.23.so...done. done. [New LWP 2018] [New LWP 2017] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /lib/libc.so.6...Reading symbols from /lib/.debug/libc-2.23.so...done. done. Reading symbols from /usr/lib/libffi.so.6...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgmodule-2.0.so.0...done. Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols found)...done. Reading symbols from /lib/libm.so.6...Reading symbols from /lib/.debug/libm-2.23.so...done. done. Reading symbols from /lib/librt.so.1...Reading symbols from /lib/.debug/librt-2.23.so...done. done. Reading symbols from /lib/libdl.so.2...Reading symbols from /lib/.debug/libdl-2.23.so...done. done. Reading symbols from /lib/ld-linux-armhf.so.3...Reading symbols from /lib/.debug/ld-2.23.so...done. done. Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstvideotestsrc.so...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstvideo-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstbase-1.0.so.0...done. Reading symbols from /usr/lib/liborc-0.4.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstlibav.so...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstpbutils-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstaudio-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgsttag-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/libbz2.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstcoreelements.so...done. 0x76bb41a4 in poll () at ../sysdeps/unix/syscall-template.S:84 84 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) (gdb) bt
+ Trace 236656
A debugging session is active. Inferior 1 [process 2015] will be detached.
Please get a backtrace of all threads with "threads apply all backtrace"
root@imx6qdlsolo:~# gdb gst-launch-1.0 3286 GNU gdb (GDB) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "arm-poky-linux-gnueabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gst-launch-1.0...done. Attaching to program: /usr/bin/gst-launch-1.0, process 3286 Reading symbols from /usr/lib/libgstreamer-1.0.so.0...done. Reading symbols from /usr/lib/libgobject-2.0.so.0...done. Reading symbols from /usr/lib/libglib-2.0.so.0...done. Reading symbols from /lib/libpthread.so.0...Reading symbols from /lib/.debug/libpthread-2.23.so...done. done. [New LWP 3289] [New LWP 3288] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /lib/libc.so.6...Reading symbols from /lib/.debug/libc-2.23.so...done. done. Reading symbols from /usr/lib/libffi.so.6...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgmodule-2.0.so.0...done. Reading symbols from /usr/lib/libpcre.so.1...(no debugging symbols found)...done. Reading symbols from /lib/libm.so.6...Reading symbols from /lib/.debug/libm-2.23.so...done. done. Reading symbols from /lib/librt.so.1...Reading symbols from /lib/.debug/librt-2.23.so...done. done. Reading symbols from /lib/libdl.so.2...Reading symbols from /lib/.debug/libdl-2.23.so...done. done. Reading symbols from /lib/ld-linux-armhf.so.3...Reading symbols from /lib/.debug/ld-2.23.so...done. done. Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstvideotestsrc.so...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstvideo-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstbase-1.0.so.0...done. Reading symbols from /usr/lib/liborc-0.4.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstlibav.so...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstpbutils-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgstaudio-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /usr/lib/libgsttag-1.0.so.0...(no debugging symbols found)...done. Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/libbz2.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols found)...done. Reading symbols from /usr/lib/gstreamer-1.0/libgstcoreelements.so...done. 0x76bbe1a4 in poll () at ../sysdeps/unix/syscall-template.S:84 84 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) (gdb) thread apply all backtrace
+ Trace 236659
Thread 3 (Thread 0x753cc470 (LWP 3288))
(gdb) thread apply all backtrace
+ Trace 236660
Created attachment 335343 [details] thread apply all backtrace
Please install debug symbols for gst-libav (and ffmpeg if you use an external ffmpeg... do you? which version?), and then get a new backtrace. This one is incomplete due to missing debug symbols.
Created attachment 335497 [details] thread apply all backtrace with debug info Please see attached file for more information with debug lib.
This should fix it, will also backport to 1.8 later. Please confirm commit 8443af343ec7dc026e27ab9cbf5d2ec47bd6fc4d Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Sep 14 11:20:48 2016 +0200 av: Cast AVContext::bit_rate to a guint before passing to varargs functions We expect it to be a int or uint, however it changed the type to a int64_t in later versions of ffmpeg. As such it would be passed as a 64 bit value to varargs functions, while the consumer of the arguments assumes only 32 bits. This causes crashes. https://bugzilla.gnome.org/show_bug.cgi?id=771092
yes, thanks~ After applying the patch, no more crash now ~