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 148721 - entrygthread fail on SMP systems
entrygthread fail on SMP systems
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.4
Other opensolaris
: Normal critical
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-07-28 20:18 UTC by Sebastien Cote
Modified: 2005-06-30 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Cote 2004-07-28 20:18:52 UTC
Running gstreamer-0.8.4 on an Sun system (2 Sparc processors running SunOS 5.8),
gst-launch fails with the following assert:

   ** ERROR **: file entryscheduler.c: line 405
(gst_entry_scheduler_get_wrapper): assertion failed: (PAD_PRIVATE (pad)->bufpen
== NULL)

The problem doesn't happen very often.  To reproduce it, I call gst-launch many
times with pipelines such as this one:

  wavenc name=sink ! filesink location="test.wav" { filesrc location="input.mp3"
! spider ! audioconvert ! queue block_timeout=100000 max-size-time=0
max-size-buffers=0 max-size-bytes=0 } !sink.sink

To me, it looks like gst_entry_scheduler_iterate() is called and it schedules
the gst_entry_scheduler_get_wrapper() from the queue, which runs in a different
thread. Before this functions gets to complete, gst_entry_scheduler_iterate() is
called again from the main thread and schedules the same link.

I could be wrong, but I think that when a link is selected for scheduling, it
should be removed from the can_schedulle() list before being run. This would
make sure it won't be called again before it completes.
Comment 1 Sebastien Cote 2004-07-30 18:47:40 UTC
Seems my assumptions were wrong. When it asserts, all the cothreads for the
pipeline have been created. The get_wrapper for the queue that asserts has
called schedule_next_element() three times already.  So this clearly doesn't
happen at creation time.  Also, when it happens, no cothread has been destroyed yet.

Sorry if I cannot provide more details, I couldn't reproduce the bug with
logging enabled.
Comment 2 Sebastien Cote 2004-08-03 19:52:32 UTC
Ok, maybe this is not related to the entrygthread scheduler after all, but to
bug 111146. 

By multiplying the block_timeout of the queue by 10, things run for much longer
before getting in trouble. I still get the assertion, but sometimes I see the
following warning:

(process:19852): GStreamer-WARNING **: inconsistent state information, fix
threading please


And sometimes, it just crashes:

GThread-ERROR **: file gthread-posix.c: line 369 (): error 'No such process'
during 'pthread_join (*(pthread_t*)thread, &ignore)'

backtrace:
  • #8 g_thread_join_posix_impl
    from /usr/local/lib/libgthread-2.0.so.0
  • #9 g_thread_join
    from /usr/local/lib/libglib-2.0.so.0
  • #10 safe_cothread_destroy
    at entryscheduler.c line 780
  • #11 gst_entry_scheduler_state_transition
    at entryscheduler.c line 913
  • #12 gst_scheduler_state_transition
    at gstscheduler.c line 316
  • #13 gst_element_change_state
    at gstelement.c line 3020
  • #14 gst_filesink_change_state
    at gstfilesink.c line 482
  • #15 gst_element_set_state_func
    at gstelement.c line 2786
  • #16 gst_element_set_state
    at gstelement.c line 2732
  • #17 set_kid_state_func
    at gstbin.c line 796
  • #18 gst_bin_foreach
    at gstbin.c line 760
  • #19 gst_bin_change_state
    at gstbin.c line 851
  • #20 gst_pipeline_change_state
    at gstpipeline.c line 174
  • #21 gst_element_set_state_func
    at gstelement.c line 2786
  • #22 gst_bin_set_state
    at gstbin.c line 890
  • #23 gst_element_set_state
    at gstelement.c line 2732

Comment 3 Sebastien Cote 2004-12-05 16:39:42 UTC
I don't have access to a Solaris box anymore so I cannot reproduce this bug. I
guess it can be closed.