GNOME Bugzilla – Bug 590056
[collectpads] race resulting in double flush-stop being outputted
Last modified: 2009-07-29 09:51:02 UTC
This is the analysis of the adder unit-test failing in gst-plugins-bad. Running suite(s): adder 83%: Checks: 6, Failures: 1, Errors: 0 gstconsistencychecker.c:66:F:general:test_live_seeking:0: Received a FLUSH_STOP without a FLUSH_START The problem is due to a race in gstcollectpads when using _set_flushing() and the internal _get_flushing() function *WITHOUT* making sure that the list of GstCollectData is actually 'in-sync' (meaning you have the latest available version). This is fixed by calling _check_pads() in _get_flushing/_set_flushing to ensure we have the *real* current state.
Created attachment 139415 [details] [review] collectpads: Split out _check_pads into a version without lock taking. This is so we can use _check_pads in places where we've already taken the lock in question.
Created attachment 139416 [details] [review] collectpads: Make sure the CollectData list is up-to-date when reading/setting it Without this, we risked: * Checking the flushing state on an unexisting list * Not setting the flushing state on pads that had just been added
Created attachment 139417 [details] [review] collectpads: Get the flushing state with the object lock taken.
Makes perfect sense to me.
commit cfb22080e28236802018868e4f40d46b57560c39 Author: Edward Hervey <bilboed@bilboed.com> Date: Tue Jul 28 21:15:52 2009 +0200 collectpads: Get the flushing state with the object lock taken. Fixes #590056 commit c138aa8648567f95331a8497dc82cb5e567dc017 Author: Edward Hervey <bilboed@bilboed.com> Date: Tue Jul 28 21:14:11 2009 +0200 collectpads: Make sure the CollectData list is up-to-date when reading/setting it Without this, we risked: * Checking the flushing state on an unexisting list * Not setting the flushing state on pads that had just been added Partially fixes #590056 commit fcbba9b15a79487cdde9b6db35693783bfd5aae3 Author: Edward Hervey <bilboed@bilboed.com> Date: Tue Jul 28 21:12:25 2009 +0200 collectpads: Split out _check_pads into a version without lock taking. This is so we can use _check_pads in places where we've already taken the lock in question. Partially fixes #590056