[Pkg-javascript-devel] Bug#844137: node-groove: FTBFS: Tests failures

Felipe Sateler fsateler at debian.org
Wed Dec 28 02:30:45 UTC 2016


Hi all,

On 26 December 2016 at 05:08, Petter Reinholdtsen <pere at hungry.com> wrote:
>
> [Felipe Sateler]
> > This suggests there is some wrong thread usage. Andrew, any idea what
> > could this be?
>
> There are several bugs that can trigger this.  For example trying to unlock an
> non-locked lock.  Using 'valgrind --tool=helgrind' make it possible to see incorrect
> lock usage.

Does anyone have hardware to test this fix? It appears the problem is
not on node-groove, but on libgrooveplayer. In particular, the dummy
device thread unlocks a mutex too early when an underrun occurs, and
then later on it is unlocked again. The following diff fixes the
helgrind error (but leaves plenty of other possible data race
warnings):

diff --git a/grooveplayer/player.c b/grooveplayer/player.c
index 5d2239c..ad4ad75 100644
--- a/grooveplayer/player.c
+++ b/grooveplayer/player.c
@@ -198,7 +198,7 @@ static void *dummy_thread(void *arg) {
                     // track of time, we're going to pretend that we did *not*
                     // just get a buffer underrun. Instead we'll wait patiently
                     // for the next buffer to appear and handle it
appropriately.
-                    pthread_mutex_unlock(&p->play_head_mutex);
                     break;
                 }
             }

However as I cannot reproduce the error, I cannot test if this indeed
fixes the issue...


-- 

Saludos,
Felipe Sateler



More information about the Pkg-javascript-devel mailing list