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 773096 - queue: Fix race when calculating cur_level.time
queue: Fix race when calculating cur_level.time
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-17 12:27 UTC by Stian Selnes (stianse)
Modified: 2018-11-03 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
queue: Fix race when calculating cur_level.time (1.44 KB, patch)
2016-10-17 12:27 UTC, Stian Selnes (stianse)
needs-work Details | Review

Description Stian Selnes (stianse) 2016-10-17 12:27:12 UTC
On the first buffer, it's possible that sink_segment is set but
src_segment has not been set yet. If this is the case, we should not
calculate cur_level.time since sink_segment.position may be large and
src_segment.position default is 0, with the resulting diff being larger
than max-size-time, causing the queue to start leaking (if
leaky=downstream).

One potential consequence of this is that the segment event may be
stored on the srcpad before the caps event is pushed downstream, causing
a g_warning ("Sticky event misordering, got 'segment' before 'caps'").
Comment 1 Stian Selnes (stianse) 2016-10-17 12:27:16 UTC
Created attachment 337844 [details] [review]
queue: Fix race when calculating cur_level.time
Comment 2 Sebastian Dröge (slomo) 2016-10-20 11:14:28 UTC
Attachment 337844 [details] pushed as d03bd54 - queue: Fix race when calculating cur_level.time
Comment 3 Sebastian Dröge (slomo) 2016-10-21 12:23:36 UTC
commit cfdb97a135ab17b93fd0ff694763868794b14014
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Oct 21 15:22:28 2016 +0300

    Revert "queue: Fix race when calculating cur_level.time"
    
    This reverts commit d03bd547809f849405a3f706920091d9b03147b0.
    
    It breaks the unit test, although it ensures that only correct values
    are used for calculations. Needs to be fixed up.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773096
Comment 4 Sebastian Dröge (slomo) 2016-10-21 12:23:53 UTC
Comment on attachment 337844 [details] [review]
queue: Fix race when calculating cur_level.time

Running suite(s): queue
81%: Checks: 11, Failures: 2, Errors: 0
elements/queue.c:537:F:general:test_time_level:0: Failure 'time != GST_SECOND' occurred
elements/queue.c:645:F:general:test_time_level_task_not_started:0: Failure 'time != 4 * GST_SECOND' occurred
Comment 5 GStreamer system administrator 2018-11-03 12:37:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/199.