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 149791 - fdsrc w/o timeout can hang exiting threads
fdsrc w/o timeout can hang exiting threads
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.4
Other Linux
: Normal normal
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-10 07:32 UTC by Jared Roberts
Modified: 2005-03-26 15:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (3.27 KB, patch)
2005-03-26 10:41 UTC, Ronald Bultje
none Details | Review

Description Jared Roberts 2004-08-10 07:32:02 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.
Comment 1 Jared Roberts 2004-08-10 07:48:58 UTC
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 }
Comment 2 Stephane Loeuillet 2004-12-15 11:12:18 UTC
could this be a dupe of bug #141828 ?

gst-launch and fakesink used there too
Comment 3 Stephane Loeuillet 2004-12-19 13:10:22 UTC
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.
Comment 4 Ronald Bultje 2004-12-19 13:32:49 UTC
No, because they don't end. They hang.
Comment 5 Stephane Loeuillet 2005-01-06 10:17:21 UTC
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().
Comment 6 Ronald Bultje 2005-03-26 10:41:12 UTC
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.
Comment 7 Ronald Bultje 2005-03-26 15:24:24 UTC
Applied.