summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-10 04:15:18 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-13 13:12:00 +0100
commit17f41be0f4c77ca0919eda193dbeca15f886e76e (patch)
tree11b7f1ec1803a5a35c31510f728c7cb4e3d5e79a /bitbake
parent7cfa913ca1e1ac332cbccf7e9ac1bba372c58b3d (diff)
downloadpoky-17f41be0f4c77ca0919eda193dbeca15f886e76e.tar.gz
bitbake: runqueue: Fix deferred task issues
In a multiconfig situation there are circumstances where firstly, tasks are deferred when they shouldn't be, then later, tasks can end up as both covered and not covered. This patch fixes two related issues. Firstly, the stamp validity checking is done up front in the build and not reevaulated. When rebuilding the deferred task list after scenequeue hash change updates, we need therefore need to check if a task was in notcovered *or* covered when deciding to defer it. This avoids strange logs like: NOTE: Running setscene task X of Y (mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch_setscene) NOTE: Deferring mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch after mc:host:/A/alsa-state.bb:do_deploy_source_date_epoch where tasks have run but are then deferred. Since we're recalculating the whole list, we also need to clear it before iterating to rebuild it. By ensuring covered tasks aren't added to the deferred queue, the covered + notcovered issue should also be avoided. in the task deadlock forcing code. [YOCTO #14342] (Bitbake rev: fa068b5a3430b1b580cacfaf9011cdc3324d5844) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3c8717fb9ee1114dd80fc1ad22ee6c9e312bdac7) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 2bb97b6ebd..2d35d478a4 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2789,6 +2789,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2789 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary) 2789 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
2790 2790
2791 sqdata.hashes = {} 2791 sqdata.hashes = {}
2792 sqrq.sq_deferred = {}
2792 for mc in sorted(sqdata.multiconfigs): 2793 for mc in sorted(sqdata.multiconfigs):
2793 for tid in sorted(sqdata.sq_revdeps): 2794 for tid in sorted(sqdata.sq_revdeps):
2794 if mc_from_tid(tid) != mc: 2795 if mc_from_tid(tid) != mc:
@@ -2801,6 +2802,9 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2801 continue 2802 continue
2802 if tid in sqrq.scenequeue_notcovered: 2803 if tid in sqrq.scenequeue_notcovered:
2803 continue 2804 continue
2805 if tid in sqrq.scenequeue_covered:
2806 continue
2807
2804 sqdata.outrightfail.add(tid) 2808 sqdata.outrightfail.add(tid)
2805 2809
2806 h = pending_hash_index(tid, rqdata) 2810 h = pending_hash_index(tid, rqdata)