archive mirror
 help / color / mirror / Atom feed
From: Steve Sakoman <>
Subject: [bitbake][dunfell][1.46][PATCH 5/7] runqueue: Fix issues with multiconfig deferred task deadlock messages
Date: Mon, 20 Feb 2023 12:25:21 -1000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Richard Purdie <>

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 <>
(cherry picked from commit ae24a0f2d2d8b4b5ec10efabd0e9362e560832ea)
Signed-off-by: Fabio Berton <>
Signed-off-by: Steve Sakoman <>
 lib/bb/ | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bb/ b/lib/bb/
index c7f50fde..f63a2191 100644
--- a/lib/bb/
+++ b/lib/bb/
@@ -1975,6 +1975,12 @@ class RunQueueExecute:
                 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(), self.stats, self.rq), self.cfgData)

  parent reply	other threads:[~2023-02-20 22:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 22:25 [bitbake][dunfell][1.46][PATCH 0/7] Patch review Steve Sakoman
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 1/7] runqueue: Fix multiconfig deferred task sstate validity caching issue Steve Sakoman
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 2/7] runqueue: Handle deferred task rehashing in multiconfig builds Steve Sakoman
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 3/7] runqueue: Improve multiconfig deferred task issues Steve Sakoman
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 4/7] runqueue: Avoid deadlock avoidance task graph corruption Steve Sakoman
2023-02-20 22:25 ` Steve Sakoman [this message]
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 6/7] runqueue: Ensure deferred tasks are sorted by multiconfig Steve Sakoman
2023-02-20 22:25 ` [bitbake][dunfell][1.46][PATCH 7/7] cooker: Drop sre_constants usage Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).