[oe-commits] [bitbake] branch master-next updated: runqueue: Fix hash equivalence duplicate tasks running

git at git.openembedded.org git at git.openembedded.org
Tue Nov 19 16:44:07 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
     new dc4b0bc  runqueue: Fix hash equivalence duplicate tasks running
dc4b0bc is described below

commit dc4b0bcffe17c2c3eae8d35a9ceb367a07051897
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Nov 19 14:25:20 2019 +0000

    runqueue: Fix hash equivalence duplicate tasks running
    
    The key problem is that currently running setscene tasks are not
    accounted for when processing task migrations. This means can allow
    two of the same task to execute at the same time with unpredictable
    effects.
    
    This change allows us to stop doing that and refactor the code slightly
    to make it clearer that these conditions don't arrive even with
    deferred tasks.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/runqueue.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 8622738..26492e7 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2303,16 +2303,22 @@ class RunQueueExecute:
         for tid in changed:
             if tid not in self.rqdata.runq_setscene_tids:
                 continue
+            if tid not in self.pending_migrations:
+                self.pending_migrations.add(tid)
+
+        for tid in self.pending_migrations.copy():
             if tid in self.runq_running:
+                # Too late, task already running, not much we can do now
+                self.pending_migrations.remove(tid)
                 continue
-            if tid in self.scenequeue_covered:
+
+            if tid in self.scenequeue_covered or tid in self.sq_live:
+                # Already ran this setscene task or it running
                 # Potentially risky, should we report this hash as a match?
                 logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
+                self.pending_migrations.remove(tid)
                 continue
-            if tid not in self.pending_migrations:
-                self.pending_migrations.add(tid)
 
-        for tid in self.pending_migrations.copy():
             valid = True
             # Check no tasks this covers are running
             for dep in self.sqdata.sq_covered_tasks[tid]:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list