summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/runqueue.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-08 15:44:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-24 14:36:17 +0000
commitb1cfaaa574a1bfec1de0d85a5b5df58ad9511a54 (patch)
treefa6839141915815dc0ed91680eb13b4f18c3ad68 /bitbake/lib/bb/runqueue.py
parent6ed895d2b2d0dd5e5c85851c082954f5bb0294a0 (diff)
downloadpoky-b1cfaaa574a1bfec1de0d85a5b5df58ad9511a54.tar.gz
bitbake: runqueue: Fix task execution corruption issue
We've seen occasional issues where linux-yocto:do_compile_kernelmodules would run without do_shared_workdir running before it. do_shared_workdir is an setscene task but never has an sstate object generated so it will always rerun. This should not happen since compile_kernemodules should only execute if a setscene that depends on it didn't run and that should trigger do_shared_workdir not to be marked as covered. The issue is that build-appliance-image:do_package is one of the tasks which covers linux-yocto:do_compile_kernelmodules but it is also a noexec task and has a dependecy on pseudo-native:do_populate_sysroot. In the problem case, pseudo-native:do_populate_sysroot is unavailable but marked as covered since it is noexec. The "harddeps" code then also marks it as notcovered. No task should ever be both covered and notcovered and this is where the problems come from. The solution is for the harddeps code only to to fail tasks if they've not already been handled in some way. The code is assuming code couldn't have handled revdeps at this point but we now have clear evidence they can. (Bitbake rev: 0a61f86a8da5356ce0d894ef2ffb96ac6a219db5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f66556bbb38449789ceea2fd105e9f68df7fb660) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/runqueue.py')
-rw-r--r--bitbake/lib/bb/runqueue.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 28bdadb45e..e22ca72ced 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2430,6 +2430,9 @@ class RunQueueExecute:
2430 2430
2431 for dep in sorted(self.sqdata.sq_deps[task]): 2431 for dep in sorted(self.sqdata.sq_deps[task]):
2432 if fail and task in self.sqdata.sq_harddeps and dep in self.sqdata.sq_harddeps[task]: 2432 if fail and task in self.sqdata.sq_harddeps and dep in self.sqdata.sq_harddeps[task]:
2433 if dep in self.scenequeue_covered or dep in self.scenequeue_notcovered:
2434 # dependency could be already processed, e.g. noexec setscene task
2435 continue
2433 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep)) 2436 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
2434 self.sq_task_failoutright(dep) 2437 self.sq_task_failoutright(dep)
2435 continue 2438 continue