summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-15 10:43:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-22 10:12:32 +0000
commite5414e596233896bb711cb72246a89a077ab9eed (patch)
treecf7329520d2987819daa7698fff2052dd2d663c7 /bitbake
parent17aad7feacce9e7c50adba6e68837105c88f8ca0 (diff)
downloadpoky-e5414e596233896bb711cb72246a89a077ab9eed.tar.gz
bitbake: runqueue: Fix multiconfig deferred task sstate validity caching issue
We were testing the validity of deferred tasks setscene status "up front" which is very unlikely to succeed and leads to cache invalidation issues. With the change to rebuild the deferred task list, this status becomes out of sync. The result was tasks being executed when they should not have been leading to extra work for the build unnecessarily. Instead, don't process validity status for deferred tasks and assume their data will become available. If it doesn't, this will now result in a build error as the setscene task will fail and the main task will run instead. In theory we could try and track the state changes in the deferred list and re-test validity then but I'm not sure it is worth the effort when the other code path and errors in setscene tasks will give a pretty good idea of what is happening anyway. (Bitbake rev: f95ed69e6c91ca6aa18d6fa9a6ac6319035c4661) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit edcafac13b3b241b6687419e59018d21811507a1) Signed-off-by: Fabio Berton <fabio.berton@criticaltechworks.com> 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.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6cdc72a85b..f82bc41357 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2084,8 +2084,6 @@ class RunQueueExecute:
2084 logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask) 2084 logger.debug(1, "%s didn't become valid, skipping setscene" % nexttask)
2085 self.sq_task_failoutright(nexttask) 2085 self.sq_task_failoutright(nexttask)
2086 return True 2086 return True
2087 else:
2088 self.sqdata.outrightfail.remove(nexttask)
2089 if nexttask in self.sqdata.outrightfail: 2087 if nexttask in self.sqdata.outrightfail:
2090 logger.debug(2, 'No package found, so skipping setscene task %s', nexttask) 2088 logger.debug(2, 'No package found, so skipping setscene task %s', nexttask)
2091 self.sq_task_failoutright(nexttask) 2089 self.sq_task_failoutright(nexttask)
@@ -2843,6 +2841,8 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2843 sqdata.stamppresent.remove(tid) 2841 sqdata.stamppresent.remove(tid)
2844 if tid in sqdata.valid: 2842 if tid in sqdata.valid:
2845 sqdata.valid.remove(tid) 2843 sqdata.valid.remove(tid)
2844 if tid in sqdata.outrightfail:
2845 sqdata.outrightfail.remove(tid)
2846 2846
2847 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid) 2847 (mc, fn, taskname, taskfn) = split_tid_mcfn(tid)
2848 2848
@@ -2887,10 +2887,10 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
2887 if tid in sqrq.scenequeue_covered: 2887 if tid in sqrq.scenequeue_covered:
2888 continue 2888 continue
2889 2889
2890 sqdata.outrightfail.add(tid)
2891
2892 h = pending_hash_index(tid, rqdata) 2890 h = pending_hash_index(tid, rqdata)
2893 if h not in sqdata.hashes: 2891 if h not in sqdata.hashes:
2892 if tid in tids:
2893 sqdata.outrightfail.add(tid)
2894 sqdata.hashes[h] = tid 2894 sqdata.hashes[h] = tid
2895 else: 2895 else:
2896 sqrq.sq_deferred[tid] = sqdata.hashes[h] 2896 sqrq.sq_deferred[tid] = sqdata.hashes[h]