GNOME Bugzilla – Bug 789763
appsink: test_query_drain unit test is racy
Last modified: 2017-12-01 09:26:37 UTC
+++ This bug was initially created as a clone of Bug #786739 +++ The new test_query_drain unit test added as part of the above bug appears to be racy. It fails sometimes on the ci: appsink.test_query_drain: Failure 'gst_app_sink_try_pull_sample (ctx->appsink, 0)' occurred
Can be reproduced locally with: $ GST_CHECKS=test_query_drain make elements/appsink.forever
Thx for reporting. I will have a look in the next weeks. As a temp measure we can either disable it or use the g_usleep from the first version of the test: https://bugzilla.gnome.org/attachment.cgi?id=358707&action=diff
Created attachment 364623 [details] [review] appsink: fix end condition of query drain handler I thought it was a problem in the unit test but in the end it was a bug in the element, see commit message.
Comment on attachment 364623 [details] [review] appsink: fix end condition of query drain handler commit 8af7b1f70b554ec25025a8c08c9f0dd14954923c Author: Julien Isorce <jisorce@oblong.com> Date: Wed Nov 29 14:53:57 2017 +0000 appsink: fix end condition of query drain handler The while loop should end when all buffers "and" the preroll buffer are consumed but this means to continue waiting if there are still some pending buffers "or" preroll buffer. The unit test was correct but racy because of this mistake. I.e. because of the wrong "and" the while could finish too early. cd tests/check && GST_CHECKS=test_query_drain make elements/appsink.forever https://bugzilla.gnome.org/show_bug.cgi?id=789763
Should this be backported to 1.12?
(In reply to Sebastian Dröge (slomo) from comment #5) > Should this be backported to 1.12? This fixes something that is not on 1.12.