mirror of
https://git.yoctoproject.org/poky
synced 2026-04-27 12:32:13 +02:00
bitbake: 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. (Bitbake rev: ac1922d348613ca46a1047ad5ddf755eac16d568) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -2303,16 +2303,22 @@ class RunQueueExecute:
|
||||
for tid in changed:
|
||||
if tid not in self.rqdata.runq_setscene_tids:
|
||||
continue
|
||||
if tid in self.runq_running:
|
||||
continue
|
||||
if tid in self.scenequeue_covered:
|
||||
# Potentially risky, should we report this hash as a match?
|
||||
logger.info("Already covered setscene for %s so ignoring rehash" % (tid))
|
||||
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 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
|
||||
|
||||
valid = True
|
||||
# Check no tasks this covers are running
|
||||
for dep in self.sqdata.sq_covered_tasks[tid]:
|
||||
|
||||
Reference in New Issue
Block a user