[oe-commits] [bitbake] 01/02: main: Handle potential server corruption/race
git at git.openembedded.org
git at git.openembedded.org
Sat Dec 1 17:44:26 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 567543293e223fcd3f4e7ea8c92f589f4e44be68
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sat Dec 1 17:28:15 2018 +0000
main: Handle potential server corruption/race
If we started a server but it didn't start fast enough and we timed out
waiting to connect to it, we could still hold the lock and think we can start
another server, even through the original is still running/starting. Starting
two servers racing against each other would be 'unpredictable'.
Release and retake the lock in the connection loop to avoid this potential
problem.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/main.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 732a315..200d0ba 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -430,8 +430,11 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
configParams.observe_only, configParams.xmlrpctoken)
else:
retries = 8
+ lock = None
while retries:
try:
+ if lock:
+ bb.utils.unlockfile(lock)
topdir, lock = lockBitbake()
sockname = topdir + "/bitbake.sock"
if lock:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list