Skip to content

Commit

Permalink
bitbake: runqueue: Ensure deferred tasks are sorted by multiconfig
Browse files Browse the repository at this point in the history
We have to prefer one multiconfig over another when deferring tasks, else
we'll have cross-linked build trees and nothing will be able to build.

In the original population code, we sort like this but we don't after
rehashing. Ensure we have the same sorting after rehashing toa void
deadlocks.

(Bitbake rev: 657940c7c2a9dea4963a5063e4bf900d6b454903)

Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 27228c7f026acb8ae9e1211d0486ffb7338123a2)
Signed-off-by: Fabio Berton <[email protected]>
Signed-off-by: Steve Sakoman <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
  • Loading branch information
rpurdie committed Feb 22, 2023
1 parent f6899f9 commit bf604a8
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions bitbake/lib/bb/runqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -2503,11 +2503,14 @@ def process_possible_migrations(self):

if update_tasks:
self.sqdone = False
for tid in [t[0] for t in update_tasks]:
h = pending_hash_index(tid, self.rqdata)
if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]:
self.sq_deferred[tid] = self.sqdata.hashes[h]
bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h]))
for mc in sorted(self.sqdata.multiconfigs):
for tid in sorted([t[0] for t in update_tasks]):
if mc_from_tid(tid) != mc:
continue
h = pending_hash_index(tid, self.rqdata)
if h in self.sqdata.hashes and tid != self.sqdata.hashes[h]:
self.sq_deferred[tid] = self.sqdata.hashes[h]
bb.note("Deferring %s after %s" % (tid, self.sqdata.hashes[h]))
update_scenequeue_data([t[0] for t in update_tasks], self.sqdata, self.rqdata, self.rq, self.cooker, self.stampcache, self, summary=False)

for (tid, harddepfail, origvalid) in update_tasks:
Expand Down

0 comments on commit bf604a8

Please sign in to comment.