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 787974 - player: race condition when seeking
player: race condition when seeking
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-21 08:06 UTC by Philippe Renon
Modified: 2017-09-24 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philippe Renon 2017-09-21 08:06:59 UTC
The race condition happens between seek() and state_changed_cb()

Under some conditions, the state_changed_cb() can end up removing the seek_source while it is being created and setup by seek(). This will lead to a null pointer de-reference in seek().

Adding a sleep (of, say, 250ms) after 
   self->seek_source = g_timeout_source_new (delay);
will greatly increase the probability of triggering the race condition.

Taking the player lock while creating and setting up the seek_source seems to address the issue.

I'll submit a patch later.
Comment 1 Philippe Renon 2017-09-24 09:26:09 UTC
False alarm. The race condition was found on a python port of gstplayer.
The port was not taking a lock in seek() as it should.