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 673604 - Seek without flush flag in paused state cause deadlock
Seek without flush flag in paused state cause deadlock
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-05 19:40 UTC by Nicolas Dufresne (ndufresne)
Modified: 2012-04-07 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample backtrace with ogg (31.33 KB, application/octet-stream)
2012-04-05 19:40 UTC, Nicolas Dufresne (ndufresne)
Details

Description Nicolas Dufresne (ndufresne) 2012-04-05 19:40:16 UTC
Created attachment 211427 [details]
Sample backtrace with ogg

I found that seeking without the flush flag, while in paused state will cause deadlock with most demuxer (tested ogg, avi, flv and qt). Found in 0.10, but reproduce in 0.11 also.

Step to reproduce:
- compile gst-plugins-base examples
- run the seek example with a muxed file (if .11 now in playback folder)
- pause the stream
- uncheck flush flag
- seek

The demuxer will try and stop the task on the pad, which will wait for the streaming lock to be released. But that never happens because we are not playing. It seems like seeking without flushing in paused state is not really possible, but we should probably not deadlock, but handle it correctly.
Comment 1 Sebastian Dröge (slomo) 2012-04-06 06:57:25 UTC
That's expected, non-flushing seeks must be used with caution. And yes, they don't work in PAUSED state (because non-flushing seeks wait until all pending data is played before doing the seek... and obviously that takes forever in PAUSED).
Comment 2 Tim-Philipp Müller 2012-04-07 13:45:12 UTC
Just to expand on that, the main use case for non-flushing seeks is looping, in which case you would do a SEGMENT seek and wait for the SEGMENT_DONE message on the bus, which the parser/demuxer driving the pipeline will post when it has finished streaming (instead of pushing an EOS event downstream).

What's your use case here?