GNOME Bugzilla – Bug 149791
fdsrc w/o timeout can hang exiting threads
Last modified: 2005-03-26 15:24:24 UTC
1. launch a pipeline from fdsrc -> fakesink in its own thread. 2. Send SIGINT First, the "expected" behavior, as seen without threads-- I launch the pipeline, hit ^C, then enter: $ gst-launch-0.8 fdsrc fd=0 ! fakesink RUNNING pipeline ... Caught interrupt. Execution ended after 1 iterations (sum 1285427000 ns, average 1285427000 ns, min 1285427000 ns, max 1285427000 ns). Now with a thread: $ gst-launch-0.8 { fdsrc fd=0 ! fakesink } RUNNING pipeline ... Waiting for the state change... Caught interrupt.
This might be a bug in dvdec, but I notice I also can't shutdown this pipeline even with a timeout in fdsrc: $ gst-launch-0.8 { fdsrc fd=0 timeout=1 ! dvdec ! fakesink }
could this be a dupe of bug #141828 ? gst-launch and fakesink used there too
i'm able to interrupt those pipelines with CTRL+C : gst-launch-0.8 { fdsrc fd=0 ! fakesink } gst-launch-0.8 { fdsrc fd=0 timeout=1 ! dvdec ! fakesink } so, is it fixed ? (i use CVS for gstreamer/gst-plugins) gst-launch-0.8 { fdsrc fd=0 timeout=1 ! dvdec ! fakesink } EXECUTION du tube en cours ... Waiting for the state change... got the state change. gst-launch-0.8 { fdsrc fd=0 ! fakesink } EXECUTION du tube en cours ... Waiting for the state change... Caught interrupt.
No, because they don't end. They hang.
no more "Caught interrupt." since a change today in gst-launch.c : 2005-01-05 David Schleef <ds@schleef.org> * tools/gst-launch.c: (idle_func), (fault_handler_sighandler), (fault_handler_sigaction), (fault_spin), (sigint_handler_sighandler), (play_handler), (main): Fix deadlocks in signal.h-type signal handlers by not calling forbidden functions, including gst_element_set_state().
Created attachment 39275 [details] [review] proposed patch This fixes it. It implements a release_locks function and it always uses timeouts during select (but in a loop if the application did not request a timeout). If you ask me, we should change the EOS-on-timeout to an error, but that is another issue.
Applied.