bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [1.52][PATCH 0/2] Review request
@ 2021-10-26 14:06 Anuj Mittal
  2021-10-26 14:06 ` [1.52][PATCH 1/2] tests/runqueue: Ensure hashserv exits before deleting files Anuj Mittal
  2021-10-26 14:06 ` [1.52][PATCH 2/2] bitbake-worker: Add debug when unpickle fails Anuj Mittal
  0 siblings, 2 replies; 3+ messages in thread
From: Anuj Mittal @ 2021-10-26 14:06 UTC (permalink / raw)
  To: bitbake-devel

Please review and merge these changes for 1.52.

Thanks,

Anuj

The following changes since commit 20eae05fdd6cb7ace87ad005f72c256e2fddb3d0:

  fetch2/perforce: Fix typo (2021-10-26 13:47:06 +0100)

are available in the Git repository at:

  git://push.openembedded.org/bitbake-contrib stable/1.52-next

Richard Purdie (2):
  tests/runqueue: Ensure hashserv exits before deleting files
  bitbake-worker: Add debug when unpickle fails

 bin/bitbake-worker       | 6 +++++-
 lib/bb/tests/runqueue.py | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [1.52][PATCH 1/2] tests/runqueue: Ensure hashserv exits before deleting files
  2021-10-26 14:06 [1.52][PATCH 0/2] Review request Anuj Mittal
@ 2021-10-26 14:06 ` Anuj Mittal
  2021-10-26 14:06 ` [1.52][PATCH 2/2] bitbake-worker: Add debug when unpickle fails Anuj Mittal
  1 sibling, 0 replies; 3+ messages in thread
From: Anuj Mittal @ 2021-10-26 14:06 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

We've seen races where the socket may be gone but the server is still writing
out it's database. Handle that case too to avoid cleanup tracebacks.

[YOCTO #14440]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit b9e4fb843cb9d3a4d4404af093a781fab5520465)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/tests/runqueue.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/tests/runqueue.py b/lib/bb/tests/runqueue.py
index 3d51779d6..4f335b8f1 100644
--- a/lib/bb/tests/runqueue.py
+++ b/lib/bb/tests/runqueue.py
@@ -361,7 +361,7 @@ class RunQueueTests(unittest.TestCase):
 
     def shutdown(self, tempdir):
         # Wait for the hashserve socket to disappear else we'll see races with the tempdir cleanup
-        while os.path.exists(tempdir + "/hashserve.sock"):
+        while (os.path.exists(tempdir + "/hashserve.sock") or os.path.exists(tempdir + "cache/hashserv.db-wal")):
             time.sleep(0.5)
 
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [1.52][PATCH 2/2] bitbake-worker: Add debug when unpickle fails
  2021-10-26 14:06 [1.52][PATCH 0/2] Review request Anuj Mittal
  2021-10-26 14:06 ` [1.52][PATCH 1/2] tests/runqueue: Ensure hashserv exits before deleting files Anuj Mittal
@ 2021-10-26 14:06 ` Anuj Mittal
  1 sibling, 0 replies; 3+ messages in thread
From: Anuj Mittal @ 2021-10-26 14:06 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fe8105cc06beca8240b76ea366a1eff5aa9c5412)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 bin/bitbake-worker | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index 6a12e1fed..7fde68876 100755
--- a/bin/bitbake-worker
+++ b/bin/bitbake-worker
@@ -417,7 +417,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">")
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-26 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 14:06 [1.52][PATCH 0/2] Review request Anuj Mittal
2021-10-26 14:06 ` [1.52][PATCH 1/2] tests/runqueue: Ensure hashserv exits before deleting files Anuj Mittal
2021-10-26 14:06 ` [1.52][PATCH 2/2] bitbake-worker: Add debug when unpickle fails Anuj Mittal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).