summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-15 12:55:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-17 11:57:27 +0100
commitb8be48c718a40bf0abafa9aa15a33dfc6ce9937c (patch)
tree76ddc12736bce95601947d9d70329fc8146db9b3
parentb635e7980f9222fb27355c411bb49235d447fa16 (diff)
downloadpoky-b8be48c718a40bf0abafa9aa15a33dfc6ce9937c.zip
poky-b8be48c718a40bf0abafa9aa15a33dfc6ce9937c.tar.gz
poky-b8be48c718a40bf0abafa9aa15a33dfc6ce9937c.tar.bz2
bitbake: bitbake-worker: Add debug when unpickle fails
We occasionally see bitbake-worker failing and from the logs, an unpickle error occurs. Add more debug so we can further debug this next time it fails. [YOCTO #14595] (Bitbake rev: fe8105cc06beca8240b76ea366a1eff5aa9c5412) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/bin/bitbake-worker6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index c8eb655..bf96207 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -418,7 +418,11 @@ class BitbakeWorker(object):
if self.queue.startswith(b"<" + item + b">"):
index = self.queue.find(b"</" + item + b">")
while index != -1:
- func(self.queue[(len(item) + 2):index])
+ try:
+ func(self.queue[(len(item) + 2):index])
+ except pickle.UnpicklingError:
+ workerlog_write("Unable to unpickle data: %s\n" % ":".join("{:02x}".format(c) for c in self.queue))
+ raise
self.queue = self.queue[(index + len(item) + 3):]
index = self.queue.find(b"</" + item + b">")