summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-26 11:27:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-27 15:22:58 +0100
commita49e5c0f4f8947dcd6dea4a445f79bd9e426b6ed (patch)
tree2eb938fcd535917bdc468f20b4049e95ff90931d /bitbake
parent227a93441f790ad66c3dccc75525af9f9a5abec6 (diff)
downloadpoky-a49e5c0f4f8947dcd6dea4a445f79bd9e426b6ed.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: 1ec855731800cf8e2bae2b1e7241640e0bad8aae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3c8717fb9ee1114dd80fc1ad22ee6c9e312bdac7) Signed-off-by: Anuj Mittal <anuj.mittal@intel.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 cd56a55472..feb42d3e6b 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2845,6 +2845,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2845 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary) 2845 sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
2846 2846
2847 sqdata.hashes = {} 2847 sqdata.hashes = {}
2848 sqrq.sq_deferred = {}
2848 for mc in sorted(sqdata.multiconfigs): 2849 for mc in sorted(sqdata.multiconfigs):
2849 for tid in sorted(sqdata.sq_revdeps): 2850 for tid in sorted(sqdata.sq_revdeps):
2850 if mc_from_tid(tid) != mc: 2851 if mc_from_tid(tid) != mc:
@@ -2857,6 +2858,9 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2857 continue 2858 continue
2858 if tid in sqrq.scenequeue_notcovered: 2859 if tid in sqrq.scenequeue_notcovered:
2859 continue 2860 continue
2861 if tid in sqrq.scenequeue_covered:
2862 continue
2863
2860 sqdata.outrightfail.add(tid) 2864 sqdata.outrightfail.add(tid)
2861 2865
2862 h = pending_hash_index(tid, rqdata) 2866 h = pending_hash_index(tid, rqdata)