[Gstreamer-bugs] [Bug 111146] Changed - new GstThread fails on pipeline with errors

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Mon Apr 21 11:30:20 PDT 2003


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=111146

Changed by in7y118 at public.uni-hamburg.de.

--- shadow/111146	Sat Apr 19 08:01:02 2003
+++ shadow/111146.tmp.7392	Mon Apr 21 14:30:20 2003
@@ -28,6 +28,43 @@
 /thread0/identity0.src: active = FALSE
 
 GStreamer-ERROR **: file gstthread.c: line 356 (gst_thread_catch):
 assertion failed: (!GST_FLAG_IS_SET (thread, GST_THREAD_STATE_SPINNING))
 aborting...
 Killed
+
+------- Additional Comments From in7y118 at public.uni-hamburg.de  2003-04-21 14:30 -------
+Ok, Patch fixing this is in HEAD.
+There are lots of races left however that can't be fixed by the thread
+element. Best way to illustrate this is by using the above example.
+Context switches to the other threads are done as I describe for the
+purpose of reproducing the error. They might happen differently when
+trying it.
+
+gst-launch runs
+...
+THREAD 
+Call to gst_element_error
+state of thread element changes until gstelement.c:2465 when the
+thread signals a state change and the main thread is woken up.
+MAIN
+Call to gst_element_set_state (thread, NULL)
+set lots of variables (esp. element->current_state and
+element->pending_state)
+enter state change function of thread which blocks on
+gst_thread_catch, because the mutex is still locked in gstthread.c:390
+context switch
+THREAD
+continues at gstelement.c:2465
+Goes on and finally exits thread's state_change handler. After this
+the return value is compared to variables from element->current_state
+and element->pending_state where it produces errors, because the
+values changed (see above).
+Goes on until it finishes the iteration and gets caught by the main
+thread.
+MAIN
+Goes on in gstthread.c:390
+Finds out that the element->current_state and element->pending_state
+variables have been changed and warns. Goes on with the _old_ values
+then, because it should work at least a little.
+
+This is really not threadsafe, but works after the last patch.





More information about the Gstreamer-bugs mailing list