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 542508 - A stress test exits with Segmentation Fault
A stress test exits with Segmentation Fault
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.14
Other Linux
: High critical
: NONE
Assigned To: Sebastian Dröge (slomo)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-11 11:10 UTC by Kirill Kirichenko
Modified: 2008-07-28 22:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Kirill Kirichenko 2008-07-11 11:10:19 UTC
The simple stress test attached below fails with Segmentation Fault after 73-rd pass on my machine. The main purpose of the test is to testify a function that checks if the current user configuration is able to play a file.
Unfortunately I can't attach the media files, but I'm sure you can find some with the same format at your testing desktop. Sometimes crashes happen during another passes.

More system info:
$ uname -a
Linux dungeon 2.6.22-gentoo-r5 #7 SMP Tue Nov 20 16:58:52 MSK 2007 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux

$ gst-inspect-0.10 --version
gst-inspect-0.10 version 0.10.14
GStreamer 0.10.14
http://www.gentoo.org

Available plugins & versions:
media-libs/gst-plugins-base  0.10.14
media-libs/gst-plugins-good  0.10.6
media-libs/gst-plugins-ugly  0.10.6
media-plugins/gst-plugins-a52dec 0.10.6
media-plugins/gst-plugins-alsa   0.10.14
media-plugins/gst-plugins-cdparanoia 0.10.14
media-plugins/gst-plugins-dvdread 0.10.6
media-plugins/gst-plugins-esd 0.10.6
media-plugins/gst-plugins-faad 0.10.5
media-plugins/gst-plugins-ffmpeg 0.10.2
media-plugins/gst-plugins-gnomevfs 0.10.14
media-plugins/gst-plugins-jpeg 0.10.6
media-plugins/gst-plugins-lame 0.10.6
media-plugins/gst-plugins-libpng 0.10.6
media-plugins/gst-plugins-libvisual 0.10.14
media-plugins/gst-plugins-mad 0.10.6
media-plugins/gst-plugins-mpeg2dec 0.10.6
media-plugins/gst-plugins-musepackn 0.10.5
media-plugins/gst-plugins-ogg 0.10.14
media-plugins/gst-plugins-pango 0.10.14
media-plugins/gst-plugins-taglib 0.10.6
media-plugins/gst-plugins-theora 0.10.14
media-plugins/gst-plugins-vorbis 0.10.14
media-plugins/gst-plugins-x 0.10.14
media-plugins/gst-plugins-xvideo 0.10.14


The test:
[code]
#include <gst/gst.h>

gchar* uri[] = {
    "file:///home/kirill/media/16b_mn_11_04.wav",
    "file:///home/kirill/media/18.swf",
    "file:///home/kirill/media/andymail.wav",
    "file:///home/kirill/media/BlackPearl.flv",
    "file:///home/kirill/media/california-love.mp3",
    "file:///home/kirill/media/ChromeNetshow.wma",
    "file:///home/kirill/media/CLOCKTXT.avi",
    "file:///home/kirill/media/ColdHardBitch-short.ogg",
    "file:///home/kirill/media/container_ship.mp4",
    "file:///home/kirill/media/copycd.wmv",
    "file:///home/kirill/media/CoralReefSample.wmv",
    "file:///home/kirill/media/crazy-frog.swf",
    "file:///home/kirill/media/demo.asf",
    "file:///home/kirill/media/duck-jibe.ogg",
    "file:///home/kirill/media/FoxNews_1Mbps.mp4",
    "file:///home/kirill/media/Ice-Age-2-short.mov",
    "file:///home/kirill/media/intro.wmv",
    "file:///home/kirill/media/island.mid",
    "file:///home/kirill/media/java_logo.png",
    "file:///home/kirill/media/kickass_av.ogg",
    "file:///home/kirill/media/kickass_v.mpg",
    "file:///home/kirill/media/mdlib.wmv",
    "file:///home/kirill/media/movie.avi",
    "file:///home/kirill/media/mp.avi",
    "file:///home/kirill/media/pause.jpg",
    "file:///home/kirill/media/play.jpg",
    "file:///home/kirill/media/rideon2.ogg",
    "file:///home/kirill/media/run.mp2",
    "file:///home/kirill/media/sail-first-jibe.ogg",
    "file:///home/kirill/media/snowman.avi",
    "file:///home/kirill/media/stop.jpg",
    "file:///home/kirill/media/test.swf",
    "file:///home/kirill/media/veronika.wav",
    "file:///home/kirill/media/Windsurfing-320x240-15fps.ogg",
    "file:///home/kirill/media/windsurfing-short.mov",
    "http://ware.catv.ext.ru:8000/moscowecho48.mp3",

    // Shouldn't play
    "file:///home/kirill/GStreamer/canplay", // URI to this binary
    NULL
};

/***********************************************************************************
 * Bus watch callback
 ***********************************************************************************/

static GMainLoop  *loop;
static GstElement *playbin;
static gboolean   result;

static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data)
{
    switch (GST_MESSAGE_TYPE (msg)) 
    {
        case GST_MESSAGE_EOS:
         {
            result = TRUE;
            g_main_loop_quit (loop);
            break;
        }

        case GST_MESSAGE_ERROR: 
        {
            result = FALSE;
            g_main_loop_quit (loop);
            break;
        }
        
        case GST_MESSAGE_STATE_CHANGED:
        {
            GstState old_state, new_state;

            gst_message_parse_state_changed (msg, &old_state, &new_state, NULL);
            if (GST_MESSAGE_SRC (msg) == GST_OBJECT (playbin) &&
                old_state == GST_STATE_PAUSED && new_state == GST_STATE_PLAYING)
            {
                result = TRUE;
                g_main_loop_quit (loop);
                break;
            }
        }

        default:
            break;
    }

    return TRUE;
}

static gboolean can_play(const gchar* uri)
{
    loop = g_main_loop_new(NULL, FALSE);
        
    playbin = gst_element_factory_make ("playbin", NULL);
    g_object_set (G_OBJECT (playbin), "uri", uri, NULL);
        
    GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (playbin));
    gst_bus_add_watch(bus, (GstBusFunc)bus_call, NULL);
    gst_object_unref (bus);
        
    g_object_set(playbin, 
                 "video-sink", gst_element_factory_make ("fakesink", NULL), 
                 "audio-sink", gst_element_factory_make ("fakesink", NULL), NULL);

    result = FALSE;

    gst_element_set_state (playbin, GST_STATE_PLAYING);
    g_main_loop_run(loop);        
    gst_element_set_state (playbin, GST_STATE_NULL);

    gst_object_unref(playbin);
    g_main_loop_unref(loop);
    
    return result;
}

int main (int argc, char *argv[])
{
    if (!g_thread_supported ()) 
        g_thread_init(NULL);

    gboolean do_functional = FALSE;
    gint     stress_amount = 0;

    GOptionEntry entries[] = 
        {
            { "functional", 'f', 0, G_OPTION_ARG_NONE, &do_functional, "perform functional test", NULL },
            { "stress", 's', 0, G_OPTION_ARG_INT, &stress_amount, "perform stress test with N stress factor", "N" },
            { NULL }
        };
    
    GOptionContext *context = g_option_context_new("[URI] - find type of the file");
    g_option_context_add_main_entries (context, entries, NULL);
    g_option_context_add_group (context, gst_init_get_option_group ());

    GError *error = NULL;
    if (g_option_context_parse (context, &argc, &argv, &error))
    {
        /*********************************************************************************
        * process arguments
        *********************************************************************************/
        if (argc == 2 && gst_uri_is_valid(argv[1]))
            g_print("%s - %s\n", argv[1], can_play(argv[1]) ? "TRUE" : "FALSE");

        if (do_functional)
        {
            g_print("****************************************************************\n");
            g_print("***************    PERFORMING FUNCTIONAL TEST   ****************\n");
            g_print("****************************************************************\n");

            int uri_size = g_strv_length(uri);
            int u_idx;

            for (u_idx = 0; u_idx < uri_size; u_idx++)
                g_print("%s - %s\n", uri[u_idx], can_play(uri[u_idx]) ? "TRUE" : "FALSE");
        }

        if (stress_amount > 0)
        {
            g_print("****************************************************************\n");
            g_print("*****************    PERFORMING STRESS TEST   ******************\n");
            g_print("****************************************************************\n");

            int uri_size = g_strv_length(uri);
            int p_idx, u_idx;

            for (p_idx = 0; p_idx < stress_amount; p_idx++)
            {
                g_print("#### Performing %i-th pass ####\n", p_idx);
                for (u_idx = 0; u_idx < uri_size; u_idx++)
                    g_print("%s - %s\n", uri[u_idx], can_play(uri[u_idx]) ? "TRUE" : "FALSE");
            }
        }
    }
    else
    {
        g_print ("option parsing failed: %s\n", error->message);
        return 1;
    }

    return 0;
}
[/code]
Comment 1 Kirill Kirichenko 2008-07-11 11:13:37 UTC
I forgot to mention that I run the program with -s 100 arguments, i.e. 100 passes for 36 files = 3600 manipulations with playbin.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2008-07-11 11:55:06 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 3 Kirill Kirichenko 2008-07-14 09:00:24 UTC
Hi Stefan.
I installed libraries with debug symbols in my gentoo system and run the test under gdb. The bug didn't reproduce either running under gbd or in command line with debugging information enabled (-ggdb)
This bug is reproduced only in console without debugging information, so I can't provide my stack trace.
It looks like there is a race condition in the library. The SegFault doesn't happen when running under gdb, because it produces a lot of output about opening/closing threads. 

I also run the test in Ubuntu 8.04, with 2.6.24-16 kernel. The tests hangs with one swf file - ordinary flash movie.

The main goal of the method canPlay is to say true/false without hanging/crashing, but it sometimes happens.

I can provide you with the media files I use in the test, tell me where to put them.
Comment 4 Kirill Kirichenko 2008-07-14 10:02:57 UTC
Okay, I managed to get the stack trace. Here it is, see it below:

#### Performing 71-th pass ####
[New Thread 0xb4effb90 (LWP 28654)]
[New Thread 0xb6222b90 (LWP 28655)]
[New Thread 0xb2fffb90 (LWP 28656)]
** Message: don't know how to handle audio/x-avi-unknown, codec_id=(int)34
** Message: don't know how to handle application/x-subtitle-avi

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_set_default: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_set_default: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_set_default: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_set_default: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_set_default: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_value_validate: assertion `G_IS_PARAM_SPEC (pspec)' failed

(canplay:27556): GLib-GObject-CRITICAL **: g_param_spec_get_redirect_target: assertion `G_IS_PARAM_SPEC (pspec)' failed

Program received signal SIGSEGV, Segmentation fault.

Thread 3044014992 (LWP 28652)

  • #0 g_object_notify
    from /usr/lib/libgobject-2.0.so.0
  • #1 cb_probe
    at gststreaminfo.c line 198
  • #2 gst_marshal_BOOLEAN__POINTER
    at gstmarshal.c line 584
  • #3 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 ??
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 ??
  • #10 ??
  • #11 ??
  • #12 ??
  • #13 ??
  • #14 ??
    from /lib/libpthread.so.0
  • #15 ??
  • #16 ??
  • #17 ??
  • #18 ??
  • #19 ??
  • #20 ??
  • #21 ??
    from /usr/lib/libgobject-2.0.so.0
  • #22 pthread_mutex_lock
    from /lib/libpthread.so.0
  • #23 g_signal_emitv
    from /usr/lib/libgobject-2.0.so.0
  • #24 gst_pad_emit_have_data_signal
    at gstpad.c line 3393
  • #25 gst_pad_push_event
    at gstpad.c line 4048
  • #26 gst_proxy_pad_do_event
    at gstghostpad.c line 140
  • #27 gst_pad_send_event
    at gstpad.c line 4206
  • #28 gst_pad_push_event
    at gstpad.c line 4062
  • #29 gst_ffmpegdec_sink_event
    at gstffmpegdec.c line 1747
  • #30 gst_pad_send_event
    at gstpad.c line 4206
  • #31 gst_pad_push_event
    at gstpad.c line 4062
  • #32 gst_queue_loop
    at gstqueue.c line 942
  • #33 gst_task_func
    at gsttask.c line 192
  • #34 ??
    from /usr/lib/libglib-2.0.so.0
  • #35 ??
  • #36 ??
  • #37 ??
  • #38 ??
  • #39 ??
    from /usr/lib/libglib-2.0.so.0
  • #40 ??
  • #41 ??
  • #42 __pthread_mutex_unlock_usercnt
    from /lib/libpthread.so.0
  • #43 ??
    from /usr/lib/libglib-2.0.so.0
  • #44 ??
  • #45 ??
  • #46 ??
    from /lib/libc.so.6
  • #47 __deallocate_stack
    from /lib/libpthread.so.0
  • #48 start_thread
    from /lib/libpthread.so.0
  • #49 clone
    from /lib/libc.so.6

Comment 5 Sebastian Dröge (slomo) 2008-07-14 10:10:41 UTC
Could you also install the GLib/GObject and glibc debug symbols?

And please try to get another backtrace with G_DEBUG=fatal_warnings  (execution will abort when the first warning is triggered)
Comment 6 Kirill Kirichenko 2008-07-15 09:59:22 UTC
Here we go:

~/Work/GStreamer $ export G_DEBUG=fatal_warnings
~/Work/GStreamer $ gdb canplay
GNU gdb 6.7.1
This GDB was configured as "i486-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) set args -s 100
(gdb) run
Starting program: /home/kirill/Work/GStreamer/canplay -s 100
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
....
....
GStreamer-CRITICAL **: gst_caps_set_simple: assertion `GST_IS_CAPS (caps)' failed
aborting...

Program received signal SIGABRT, Aborted.

Thread 3039964048 (LWP 5174)

  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 88
  • #2 IA__g_logv
    at gmessages.c line 497
  • #3 IA__g_log
    at gmessages.c line 517
  • #4 IA__g_return_if_fail_warning
  • #5 gst_caps_set_simple
    at gstcaps.c line 872
  • #6 gst_riff_create_video_caps
    at riff-media.c line 603
  • #7 gst_avi_demux_parse_stream
    at gstavidemux.c line 1298
  • #8 gst_avi_demux_stream_header_pull
    at gstavidemux.c line 2831
  • #9 gst_avi_demux_loop
    at gstavidemux.c line 3682
  • #10 gst_task_func
    at gsttask.c line 192
  • #11 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #12 g_thread_create_proxy
    at gthread.c line 635
  • #13 start_thread
    at pthread_create.c line 296
  • #14 clone
    from /lib/libc.so.6

Comment 7 Sebastian Dröge (slomo) 2008-07-15 13:04:34 UTC
Could you make the file available at which it is currently crashing?

Apart from that this commit fixes the only place which could lead to NULL caps at that place... could you check if this fixes this issue? There might be other issues though, if stuff is still crashing or giving warnings please attach more backtraces like the last one :)

2008-07-15  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

	* gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps):
	Make it impossible to have NULL caps at the point where we set
	framerate and other things. Also don't return immediately for "3ivd"
	video and let framerate, etc be set. Might fix bug #542508.
Comment 8 Sebastian Dröge (slomo) 2008-07-15 13:05:27 UTC
Also could you check with latest gstreamer, gst-plugins-base, gst-plugins-good, etc ? Your versions are a bit ancient :)
Comment 9 Kirill Kirichenko 2008-07-15 14:41:56 UTC
(In reply to comment #7)
> Could you make the file available at which it is currently crashing?
See the attachment - it's snowman.avi file which is not playable by gstreamer with all plugins installed.

Actually I can send you all these files I use in the test. They take 140 mb. If you have some ftp or another way of transferring such an archive I can send it to you. 

> Apart from that this commit fixes the only place which could lead to NULL caps
> at that place... could you check if this fixes this issue? There might be other
> issues though, if stuff is still crashing or giving warnings please attach more
> backtraces like the last one :)

Here is a backtrace without G_DEBUG=fatal_warnings exported i.e. where the test actually crashes with SegFault:

Program received signal SIGSEGV, Segmentation fault.

Thread 3070446480 (LWP 5163)

  • #0 ??
  • #1 IA__g_object_set_valist
    at gobjectnotifyqueue.c line 123
  • #2 IA__g_object_set
    at gobject.c line 1212
  • #3 set_active_source
    at gstplaybasebin.c line 2352
  • #4 setup_substreams
    at gstplaybasebin.c line 1709
  • #5 group_commit
    at gstplaybasebin.c line 460
  • #6 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #7 IA__g_closure_invoke
    at gclosure.c line 490
  • #8 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #9 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #10 IA__g_signal_emit
    at gsignal.c line 2243
  • #11 gst_element_no_more_pads
    at gstelement.c line 824
  • #12 dynamic_remove
    at gstdecodebin.c line 1291
  • #13 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #14 IA__g_closure_invoke
    at gclosure.c line 490
  • #15 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #16 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #17 IA__g_signal_emit
    at gsignal.c line 2243
  • #18 gst_element_no_more_pads
    at gstelement.c line 824
  • #19 qtdemux_parse_tree
    at qtdemux.c line 3548
  • #20 gst_qtdemux_loop
    at qtdemux.c line 999
  • #21 gst_task_func
    at gsttask.c line 192
  • #22 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #23 g_thread_create_proxy
    at gthread.c line 635
  • #24 start_thread
    at pthread_create.c line 296
  • #25 clone
    from /lib/libc.so.6

Thread 2988440464 (LWP 9129)

  • #0 IA__g_object_notify
    at gobjectnotifyqueue.c line 120
  • #1 cb_probe
    at gststreaminfo.c line 198
  • #2 gst_marshal_BOOLEAN__POINTER
    at gstmarshal.c line 584
  • #3 IA__g_closure_invoke
    at gclosure.c line 490
  • #4 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #5 IA__g_signal_emitv
    at gsignal.c line 2111
  • #6 gst_pad_emit_have_data_signal
    at gstpad.c line 3393
  • #7 gst_pad_push_event
    at gstpad.c line 4048
  • #8 gst_proxy_pad_do_event
    at gstghostpad.c line 140
  • #9 gst_pad_send_event
    at gstpad.c line 4206
  • #10 gst_pad_push_event
    at gstpad.c line 4062
  • #11 gst_ffmpegdec_sink_event
    at gstffmpegdec.c line 1747
  • #12 gst_pad_send_event
    at gstpad.c line 4206
  • #13 gst_pad_push_event
    at gstpad.c line 4062
  • #14 gst_queue_loop
    at gstqueue.c line 942
  • #15 gst_task_func
    at gsttask.c line 192
  • #16 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #17 g_thread_create_proxy
    at gthread.c line 635
  • #18 start_thread
    at pthread_create.c line 296
  • #19 clone
    from /lib/libc.so.6

Comment 10 Kirill Kirichenko 2008-07-15 14:46:26 UTC
I couldn't attach the file. It's about 12 MB in size. 
I need some place to put files to.
Comment 11 Sebastian Dröge (slomo) 2008-07-15 14:55:44 UTC
That's probably the infamous g_object_notify() thread safety issue...
Do you get other warnings with latest CVS before the segfault though?

Well, you could upload the file to rapidshare for example or one of the millions other file upload services :) Or is it publically available somewhere?
Comment 12 Kirill Kirichenko 2008-07-15 15:12:36 UTC
I didn't try the latest CVS yet.
I'll let you know when I get on with rapidshare or something like that.

BTW the segfault happens regardless of whether I include the snowman.avi file in the uri list. So looks like the problem is somewhere else.

I'll try to provide you with all files I use either through the rapidshare of ftp.
I'll let you know. And you'll be able to run this test with the latest/greatest sources you have there.
Comment 13 Sebastian Dröge (slomo) 2008-07-15 16:13:55 UTC
Ok, that's great. Could you also attach your test application's source code? :)

And you could try latest releases, Gentoo has them all AFAIK :) And then apply the following diff on gst-plugins-base:

http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst-libs/gst/riff/riff-media.c.diff?r1=1.101&r2=1.102

No need to try with CVS IMHO
Comment 14 Kirill Kirichenko 2008-07-16 16:29:17 UTC
Hi, Sebastian.
Look like I found a place where to upload files.
Would it be acceptable for you to download a 108MB archive with files and source code of the test ?

Comment 15 Sebastian Dröge (slomo) 2008-07-16 17:36:33 UTC
Sure, that's fine :)
If it's not public feel free to send me an email
Comment 16 Kirill Kirichenko 2008-07-18 10:59:12 UTC
Okay.
Here is the link:
https://supportuploads.sun.com/download?directory=europe-cores/uk/downloads&file=542508%2etar%2ebz2

or alternatively go to 
https://supportfiles.sun.com/download
Name of the file to download is 542508.tar.bz2
Directory name: europe-cores/uk/downloads

When you download the file it's checksum is 812402251:
$ cksum 542508.tar.bz2 
812402251 105961071 542508.tar.bz2

Step to reproduce the bug:
1) unpack the file:
$ tar -xjvf 542508.tar.bz2

2) Compile it
$ cd 542508/

There is canplay.in file from which the ./convert.pl Perl script builds canplay.c C file with correct directories. All you need is to run make:
$ make

3) From now you can play with it either by running it in one of three modes:
$ ./canplay --help

Functional test:
$ ./canplay -f

Stress test:
$ ./canplay -s 100

or debugging it with gdb

The SegFault is alway reproduced during stress test.

There is one more interesting thing. You'll find this line commented in the canplay.in:
//"file://${WORK_DIR}/media/ducks16x9.960x540at1000kbpsVBR.wmv"
When you build your own copy of canplay.c try to run this line:
$ ./canplay file://${WORK_DIR}/media/ducks16x9.960x540at1000kbpsVBR.wmv
Where ${WORK_DIR} is a concrete working directory. You'll find out that playbin hangs on this file. Maybe it's another bug ?!

If you have any questions please ask.
Comment 17 Sebastian Dröge (slomo) 2008-07-20 13:11:30 UTC
./canplay -s 500 worked fine for me without hangs, crashes, etc. So everything seems to be fixed with latest CVS.


ducks16x9.960x540at1000kbpsVBR.wmv hangs for me too, let's open another bug for this :)
Comment 18 Sebastian Dröge (slomo) 2008-07-20 13:17:51 UTC
This is handled in bug #543852
Comment 19 Kirill Kirichenko 2008-07-21 15:10:04 UTC
I would agree with you if the SegFault didn't reproduce on my computer with the latest CVS sources =)

Could you please cut'n'paste here the output of this command:
$ canplay -f
Comment 20 Sebastian Dröge (slomo) 2008-07-21 15:58:42 UTC
So it still crashes with latest CVS for you? Ok, could you get a backtrace then? :) And are there any warnings or something before the backtrace? In that case G_DEBUG=fatal_warnings as before for the backtrace :)

Below the canplay -f output. Note that the ffmpeg ERROR is just a warning and the file plays fine for me... someone should report that to the ffmpeg guys ;)

$ canplay -f
****************************************************************
****************    PERFORMING FUNCTIONAL TEST  ****************
********************    for 35 files  ********************
****************************************************************
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/skier.3gp - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/Tom_and_Jerry.3gp - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.16bit.aif - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/short.8bit.au - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/tiny.mono.8bit8khz.au - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/tiny.stereo.8bit22khz.au - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.16bit.au - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.divx.16x9.640x352at1500kbps.avi - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/duck.divx.16x9.720x400at1500kbps.avi - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks.divix.4x3.640x480.at800kbps.avi - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.divix.16x9.960x540at2000kbps.avi - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.h264.4x3.960x560at100kbps.mp4 - TRUE
0:00:40.310257006 16150  0x845b030 ERROR               ffmpeg :0:: brainfart cropping not supported, this could look slightly wrong ...
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks.h264.16x9.360x180at500kbps.mp4 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/movie.avi - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/clip.ogg - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks.4x3.640x480at1000kbps.mov - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/short.stereo.320kbps.mp3 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.mono.64kbps.mp3 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/tiny.mono.8kbps.mp3 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.16x9.640x360at200kbps.mp4 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks4x3.160x120at220kbps.mp4 - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks.4x3.160x120at700kbps.mpg - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.16x9.640x360at400kbps.mpg - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/ducks.4x3.360x240.at600kbps.ogg - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.16x9.720x576at5500kbps.ogg - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/short.16bit.wav - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/tiny.stereo.8bit.wav - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.24bit.wav - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/short.stereo.320kbps.CBR.wma - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.mono.32bitCBR.wma - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/long.stereo.64bitCBR.wma - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/tiny.stereo.64kbpsCBR.wma - TRUE
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/media/snippet.16x9.1280x720at500kbpsCBR.wmv - TRUE
http://ware.catv.ext.ru:8000/moscowecho48.mp3 - TRUE
** Message: don't know how to handle application/x-executable
file:///home/slomo/projects/gstreamer/head/samples/542508/542508/canplay - FALSE
Comment 21 Kirill Kirichenko 2008-07-21 16:40:10 UTC
(gdb) bt
  • #0 ??
  • #1 IA__g_object_set_valist
    at gobjectnotifyqueue.c line 123
  • #2 IA__g_object_set
    at gobject.c line 1212
  • #3 set_active_source
    at gstplaybasebin.c line 2484
  • #4 setup_substreams
    at gstplaybasebin.c line 1783
  • #5 group_commit
    at gstplaybasebin.c line 484
  • #6 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #7 IA__g_closure_invoke
    at gclosure.c line 490
  • #8 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #9 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #10 IA__g_signal_emit
    at gsignal.c line 2243
  • #11 gst_element_no_more_pads
    at gstelement.c line 837
  • #12 dynamic_remove
    at gstdecodebin.c line 1442
  • #13 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 77
  • #14 IA__g_closure_invoke
    at gclosure.c line 490
  • #15 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #16 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #17 IA__g_signal_emit
    at gsignal.c line 2243
  • #18 gst_element_no_more_pads
    at gstelement.c line 837
  • #19 gst_ffmpegdemux_loop
    at gstffmpegdemux.c line 1074
  • #20 gst_task_func
    at gsttask.c line 192
  • #21 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #22 g_thread_create_proxy
    at gthread.c line 635
  • #23 start_thread
    at pthread_create.c line 296
  • #24 clone
    from /lib/libc.so.6

Comment 22 Sebastian Dröge (slomo) 2008-07-21 17:23:23 UTC
Ah I thought that was with the older versions... ok, that's bug #533427 then :)
Comment 23 Kirill Kirichenko 2008-07-21 18:36:26 UTC
So it's a duplicate of 533427, isn't it ?
Is it gonna be fixed in GStreamer any time soon or you're relying on glib developers ?