Skip to contentSkip to conversation

[2.20][PATCH 0/1] Patch review

bitbake Yoann Congal 1 participant 2 messages Nov 5

lore
Share & tools
lore
#0 lore raw

Please review this set of changes for blacksail and have comments back by end of day Monday, November 9.

Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/5060

The following changes since commit 634f8dede6b9d71b5a6691499fd05a8678b46eae:

bitbake: Bump to version 2.20.0 (2026-09-29 14:04:37 +0100)

are available in the Git repository at:

https://git.openembedded.org/bitbake-contrib stable/2.20-review
https://git.openembedded.org/bitbake-contrib/log/?h=stable/2.20-review

for you to fetch changes up to 7f7ae8cd58993a389adbd130b07ea5de8415d2f9:

server/process: Fix lock owner prefix check during shutdown (2026-11-04 22:23:28 +0100)

----------------------------------------------------------------

Reda Maher (1):
server/process: Fix lock owner prefix check during shutdown

 bin/bitbake-selftest     |  1 +
 lib/bb/server/process.py |  2 +-
 lib/bb/tests/server.py   | 57 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 lib/bb/tests/server.py
#1 lore raw

[bitbake][blacksail][2.20][PATCH 1/1] server/process: Fix lock owner prefix check during shutdown

From: Reda Maher <[email protected]>

Pass a tuple to str.startswith() when checking a contended lock during shutdown. The list raises TypeError before the server can retry its own lock or recognize a replacement server.

Add a deterministic shutdown regression test covering PID-only and XML-RPC lock records, including a replacement PID sharing the old PID's prefix. Verified failure before the fix and success with bitbake-selftest bb.tests.server afterwards.

AI-Generated: Uses GitHub Copilot

(cherry picked from commit 1763256342ae4d7f8028e8222400c6fc8c24d4a3)
---
 bin/bitbake-selftest     |  1 +
 lib/bb/server/process.py |  2 +-
 lib/bb/tests/server.py   | 57 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)
 create mode 100644 lib/bb/tests/server.py
bin/bitbake-selftest +1 -0
index 855abb1f0..e5a68ba1d 100755
@@ -35,6 +35,7 @@ tests = ["bb.tests.codeparser",
          "bb.tests.fetch_import",
          "bb.tests.parse",
          "bb.tests.runqueue",
+         "bb.tests.server",
          "bb.tests.setup",
          "bb.tests.siggen",
          "bb.tests.utils",
lib/bb/server/process.py +1 -1
index d0f73590c..a103b0987 100644
@@ -377,7 +377,7 @@ class ProcessServer():
                 lock = bb.utils.lockfile(lockfile, shared=False, retry=False, block=False)
                 if not lock:
                     newlockcontents = get_lock_contents(lockfile)
-                    if not newlockcontents[0].startswith([f"{os.getpid()}\n", f"{os.getpid()} "]):
+                    if not newlockcontents[0].startswith((f"{os.getpid()}\n", f"{os.getpid()} ")):
                         # A new server was started, the lockfile contents changed, we can exit
                         serverlog("Lockfile now contains different contents, exiting: " + str(newlockcontents))
                         return
lib/bb/tests/server.py new file +57 -0

57 lines not on this page · raw message