diff mbox series

[kirkstone,2.0,01/14] runqueue: Fix unihash cache mismatch issues

Message ID e348cf75da604b299d04a4d4f86a28428feabb55.1663078873.git.steve@sakoman.com
State Accepted, archived
Commit 81a6f490dd1f5f669c75cd2ceb1105ce7a09c6e4
Headers show
Series [kirkstone,2.0,01/14] runqueue: Fix unihash cache mismatch issues | expand

Commit Message

Steve Sakoman Sept. 13, 2022, 2:26 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

Very occasionally we see errors in eSDK testing on the autobuilder where the task
hashes in the eSDK don't match what was just built. I was able to inspect one of
these build directories and noticed that the bb_unihashes.dat file in the eSDK
was zero sized. Whilst inspecting the code to understand the cause, I noticed that
updated hashes are not saved out in subsequent updates of the values in the rehash
process.

Add a missing sync call to ensure this happens.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7912dabbcf444a3c3d971cca4a944a8b931e301b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/runqueue.py | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 7eea72e6..111dc0ee 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2381,6 +2381,9 @@  class RunQueueExecute:
                     self.rqdata.runtaskentries[hashtid].unihash = unihash
                     bb.parse.siggen.set_unihash(hashtid, unihash)
                     toprocess.add(hashtid)
+                if torehash:
+                    # Need to save after set_unihash above
+                    bb.parse.siggen.save_unitaskhashes()
 
         # Work out all tasks which depend upon these
         total = set()