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 381492 - [SystemClock] ClockID wait_async notification broken
[SystemClock] ClockID wait_async notification broken
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.12
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-02 04:25 UTC by René Stadler
Modified: 2006-12-17 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Testsuite addition to demonstrate broken async notification (1.90 KB, patch)
2006-12-02 04:26 UTC, René Stadler
committed Details | Review

Description René Stadler 2006-12-02 04:25:11 UTC
Situation: With the system clock, create two clock ids for some clock times T1 and T2 in the future such that T1 < T2.  Perform an async_wait on the id for T2, then the same for the other id.  Note that the chronological order is swapped; the id to trigger first is added for async notification in second (which should not matter).

Expected result: At T1 and T2, a notification happens for each clock id respectively.

Actual result: The clock ignores the early id until T2 is reached, at which point it notifies the id for T2 and then the T1 id shortly afterwards.

Attaching a testsuite addition that demonstrates the problem.
Comment 1 René Stadler 2006-12-02 04:26:39 UTC
Created attachment 77522 [details] [review]
Testsuite addition to demonstrate broken async notification
Comment 2 Wim Taymans 2006-12-04 09:15:24 UTC
That's just awesome, thanks for noticing. This will have to wait a couple of days for after the release.
Comment 3 Wim Taymans 2006-12-07 10:52:18 UTC
        Patch by: Rene Stadler <mail at renestadler dot de>

        * gst/gstclock.c: (gst_clock_id_wait):
        Make period ids add the interval to the origial requested time instead
        of the possibly updated time which can be wrong when there are multiple
        waiters for the same id. Fixes #382592.

        * gst/gstsystemclock.c: (gst_system_clock_async_thread),
        (gst_system_clock_id_wait_jitter_unlocked),
        (gst_system_clock_id_wait_jitter):
        Fix restart in the async notify thread when an async entry is added to
        the front of the list. Fixes #381492.

        * tests/check/gst/gstsystemclock.c: (store_callback),
        (notify_callback), (GST_START_TEST), (gst_systemclock_suite):
        Added test for multiple async waits.
        Added test for async wait order.