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 771092 - avenc: Got Caught SIGSEGV when using avenc_xxx
avenc: Got Caught SIGSEGV when using avenc_xxx
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
1.8.1
Other Linux
: Normal normal
: 1.8.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-09 03:33 UTC by Lyon
Modified: 2016-09-30 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thread apply all backtrace (4.14 KB, text/plain)
2016-09-12 09:06 UTC, Lyon
Details
thread apply all backtrace with debug info (7.23 KB, text/plain)
2016-09-14 08:50 UTC, Lyon
Details

Description Lyon 2016-09-09 03:33:41 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
Comment 1 Sebastian Dröge (slomo) 2016-09-09 07:26:39 UTC
Which version on which platform is that? Can you get a backtrace of all threads when it crashes?
Comment 2 Lyon 2016-09-12 07:49:56 UTC
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
  • #0 poll
    at ../sysdeps/unix/syscall-template.S line 84
  • #1 g_main_context_iterate
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/gmain.c line 4135
  • #2 g_main_context_iterate
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/gmain.c line 3835
  • #3 g_main_loop_run
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/gmain.c line 4034
  • #4 gst_bus_poll
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gstbus.c line 1157
  • #5 event_loop
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 532
  • #6 main
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 1074
A debugging session is active.

	Inferior 1 [process 2015] will be detached.
Comment 3 Sebastian Dröge (slomo) 2016-09-12 08:47:20 UTC
Please get a backtrace of all threads with "threads apply all backtrace"
Comment 4 Lyon 2016-09-12 09:02:57 UTC
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

Thread 3 (Thread 0x753cc470 (LWP 3288))

  • #0 nanosleep
    at ../sysdeps/unix/syscall-template.S line 84
  • #1 g_usleep
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/gtimer.c line 259
  • #2 fault_handler_sighandler
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 112
  • #3 fault_handler_sighandler
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 93
  • #4 <signal handler called>
  • #5 g_str_hash
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 1875
  • #6 g_hash_table_lookup
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 375
  • #7 g_hash_table_lookup
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 1147
  • #8 gst_tag_lookup
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 466
  • #9 gst_tag_list_add_valist
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 1287
  • #10 gst_tag_list_add
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 1230
  • #11 0x7561b48c in

Comment 5 Lyon 2016-09-12 09:03:54 UTC
(gdb) thread apply all backtrace

Thread 3 (Thread 0x753cc470 (LWP 3288))

  • #0 nanosleep
    at ../sysdeps/unix/syscall-template.S line 84
  • #1 g_usleep
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/gtimer.c line 259
  • #2 fault_handler_sighandler
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 112
  • #3 fault_handler_sighandler
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/tools/gst-launch.c line 93
  • #4 <signal handler called>
  • #5 g_str_hash
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 1875
  • #6 g_hash_table_lookup
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 375
  • #7 g_hash_table_lookup
    at /usr/src/debug/glib-2.0/1_2.46.2-r0/glib-2.46.2/glib/ghash.c line 1147
  • #8 gst_tag_lookup
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 466
  • #9 gst_tag_list_add_valist
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 1287
  • #10 gst_tag_list_add
    at /usr/src/debug/gstreamer1.0/1.8.1-r0/gstreamer-1.8.1/gst/gsttaglist.c line 1230
  • #11 0x7561b48c in

Comment 6 Lyon 2016-09-12 09:06:52 UTC
Created attachment 335343 [details]
thread  apply all backtrace
Comment 7 Sebastian Dröge (slomo) 2016-09-13 08:52:27 UTC
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.
Comment 8 Lyon 2016-09-14 08:50:08 UTC
Created attachment 335497 [details]
thread  apply all backtrace with debug info

Please see attached file for more information with debug lib.
Comment 9 Sebastian Dröge (slomo) 2016-09-14 09:22:28 UTC
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
Comment 10 Lyon 2016-09-14 09:38:55 UTC
yes, thanks~
After applying the patch, no more crash now ~