summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 10:43:20 +0000
committerSteve Sakoman <steve@sakoman.com>2023-02-17 04:41:08 -1000
commit03cf0d9fedfef1ae43b3c3cac07710487857af36 (patch)
treef897febae427b087fec20fc5c4ccd3b2b3c9c72d
parent2e1354525217505ce34fe775ee6ec8af46ff5324 (diff)
downloadbitbake-03cf0d9fedfef1ae43b3c3cac07710487857af36.tar.gz
runqueue: Fix issues with multiconfig deferred task deadlock messages
In multiconfig builds with large numbers of identical tasks, builds were deadlocking after recent runqueue changes upon rebuilds where there was heavy sstate usage (i.e. on second builds after a first completed). The issue was that deferred tasks were being left indefinitely on the deferred list. The deadlock handler was then "breaking" things by failing tasks that had already succeeded, leading to the task being on both covered and not covered lists, giving a further error. The fix is to clean up the deferred task list when each setscene task completes. I'd previously been hoping to avoid iterating that list but it appears unavoidable. [YOCTO #14342] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ae24a0f2d2d8b4b5ec10efabd0e9362e560832ea) Signed-off-by: Fabio Berton <fabio.berton@criticaltechworks.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--lib/bb/runqueue.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index c7f50fdeb..f63a21914 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1975,6 +1975,12 @@ class RunQueueExecute:
self.setbuildable(revdep)
logger.debug(1, "Marking task %s as buildable", revdep)
+ for t in self.sq_deferred.copy():
+ if self.sq_deferred[t] == task:
+ logger.debug(2, "Deferred task %s now buildable" % t)
+ del self.sq_deferred[t]
+ update_scenequeue_data([t], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)
+
def task_complete(self, task):
self.stats.taskCompleted()
bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)