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 767859 - discoverer: Don't crash when trying to serialize non-OK discoverer infos to a GVariant
discoverer: Don't crash when trying to serialize non-OK discoverer infos to a...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.8.2
Other Linux
: Normal normal
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-20 08:52 UTC by Lim Siew Hoon
Modified: 2016-06-27 06:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbg.log.xz (85.39 KB, application/x-xz)
2016-06-20 09:16 UTC, Lim Siew Hoon
Details

Description Lim Siew Hoon 2016-06-20 08:52:21 UTC
Architecture: Centos 7 64bit
Architecture: Ubuntu 14.04 64bit

Below are the log from Centos7 64bit
===============================================================
   GStreamer Base Plug-ins 1.8.2: tests/check/test-suite.log
===============================================================

# TOTAL: 53
# PASS:  51
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: libs/discoverer
=====================

Running suite(s): discoverer
85%: Checks: 7, Failures: 0, Errors: 1
libs/discoverer.c:68:E:general:test_disco_serializing:0: (after this point) Received signal 11 (Segmentation fault)

FAIL: elements/playbin-complex
==============================

Running suite(s): playbin_complex
92%: Checks: 14, Failures: 1, Errors: 0
elements/playbin-complex.c:862:F:general:test_autoplug_decoder_sink_combination:0: 'gst_element_get_state (playbin, NULL, NULL, -1)' (0) is not equal to 'GST_STATE_CHANGE_SUCCESS' (1)
Comment 1 Tim-Philipp Müller 2016-06-20 08:59:01 UTC
Could you:

$ cd tests/check 

and:

1) $ make libs/discoverer.gdb
   (gdb) run
   ... crash ..
   (gdb) thread apply all bt
   ... paste output
   (gdb) kill
   (gdb) quit

2) $ GST_DEBUG=*:6 GST_CHECKS=test_autoplug_decoder_sink_combination make elements/playbin-complex.check-norepeat 2>/tmp/dbg.log
   $ xz -9 /tmp/dbg.log
   attach /tmp/dbg.log.xz

Thanks!
Comment 2 Lim Siew Hoon 2016-06-20 09:12:11 UTC
1)

Reading symbols from /home/root/open_media/1.8.2/gst-plugins-base-1.8.2/tests/check/libs/.libs/lt-discoverer...done.
(gdb) run
Starting program: /home/root/open_media/1.8.2/gst-plugins-base-1.8.2/tests/check/libs/.libs/lt-discoverer
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Running suite(s): discoverer
[New Thread 0x7ffff4fcb700 (LWP 8944)]

Program received signal SIGSEGV, Segmentation fault.
gst_discoverer_info_to_variant_recurse (sinfo=sinfo@entry=0x0, flags=flags@entry=GST_DISCOVERER_SERIALIZE_ALL) at gstdiscoverer.c:1721
1721      GVariant *common_stream_variant =
Missing separate debuginfos, use: debuginfo-install glib2-2.42.2-5.el7.x86_64 glibc-2.17-78.el7.x86_64 libffi-3.0.13-16.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 pcre-8.32-15.el7.x86_64 xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64
(gdb) thread apply all bt

Thread 2 (Thread 0x7ffff4fcb700 (LWP 8944))

  • #0 syscall
  • #1 g_cond_wait_until
  • #2 g_async_queue_pop_intern_unlocked
  • #3 g_thread_pool_thread_proxy
  • #4 g_thread_proxy
  • #5 start_thread
  • #6 clone

Thread 1 (Thread 0x7ffff7fd7740 (LWP 8940))

  • #0 gst_discoverer_info_to_variant_recurse
    at gstdiscoverer.c line 1721
  • #1 gst_discoverer_info_to_variant
    at gstdiscoverer.c line 2208
  • #2 test_disco_serializing
    at libs/discoverer.c line 69
  • #3 tcase_run_tfun_nofork
    at check_run.c line 378
  • #4 srunner_run
    at check_run.c line 228
  • #5 srunner_run
    at check_run.c line 362
  • #6 srunner_run
    at check_run.c line 195
  • #7 srunner_run
    at check_run.c line 706
  • #8 srunner_run_all
    at check_run.c line 674
  • #9 gst_check_run_suite
    at gstcheck.c line 824
  • #10 main
    at libs/discoverer.c line 251

Comment 3 Lim Siew Hoon 2016-06-20 09:16:21 UTC
Created attachment 330054 [details]
dbg.log.xz

Attached dbg.log.xz
Comment 4 Lim Siew Hoon 2016-06-21 03:05:37 UTC
After install:
The libtheora reference implementation provides the standard encoder and decoder under a BSD license.
[libtheora-1.1.1.tar.bz2]

The libtheora implementation depends on the following libraries...
libogg-1.3.1
libvorbis-1.3.3
libSDL 1.2 or later for the playback example

The test also passed in gst-plugins-base for "make check"
Comment 5 Sebastian Dröge (slomo) 2016-06-21 07:25:33 UTC
commit 26f63db498facc0c489503175463be53dec833b9
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jun 21 10:24:15 2016 +0300

    discoverer: Only allow serializing OK discoverer infos to GVariants
    
    They will be incomplete otherwise and we can't generate the full serialized
    information, and instead will crash somewhere on the way.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767859
Comment 6 Tim-Philipp Müller 2016-06-21 08:16:58 UTC
Question is should this happen at all in a unit test? (Or is it again because theora elements are not available?)
Comment 7 Sebastian Dröge (slomo) 2016-06-21 08:51:09 UTC
It happens because theora/vorbis elements are not available. The test should fail gracefully then instead of crashing probably :)
Comment 8 Tim-Philipp Müller 2016-06-21 17:05:39 UTC
commit d3d2e8b94aea91865eb5489e6421fd45bb5e2c4b
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Tue Jun 21 18:04:23 2016 +0100

    tests: discoverer: handle missing ogg/codec plugins gracefully
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767859
Comment 9 Sebastian Dröge (slomo) 2016-06-27 06:32:51 UTC
The discoverer part that actually causes the crash is in 1.8 now.