aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStacy Gaikovaia <Stacy.Gaikovaia@windriver.com>2020-10-23 10:17:56 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-26 22:09:48 +0000
commitfec2b85689bba1d26ad6f376bc11cc29bb27cbe5 (patch)
tree2caebcfabc032db372a3277346a583351744b576
parent8b9471e02528320f6ef8d35840b5618883e85447 (diff)
downloadbitbake-fec2b85689bba1d26ad6f376bc11cc29bb27cbe5.tar.gz
main: Handle cooker daemon startup erroryocto-3.22020-10.1-gatesgarth2020-10-gatesgarth1.48.11.48.0
On startup, bitbake spawns a cooker daemon and waits for it's acknowledgement signal. If the acknowledgement doesn't happen in time,the bitbake object will fail to initialize and exit. The error that occurs in this case isn't handled by the existing try - catch block because SystemExit inherits from a different base Exception class. This commit adds SystemExit to the list of expected bitbake server startup errors. [YOCTO #13993] Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xlib/bb/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/main.py b/lib/bb/main.py
index 7990195ea..e92e409f0 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -456,15 +456,17 @@ def setup_bitbake(configParams, extrafeatures=None):
break
except BBMainFatal:
raise
- except (Exception, bb.server.process.ProcessTimeout) as e:
+ except (Exception, bb.server.process.ProcessTimeout, SystemExit) as e:
+ # SystemExit does not inherit from the Exception class, needs to be included explicitly
if not retries:
raise
retries -= 1
tryno = 8 - retries
- if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError)):
+ if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError, SystemExit)):
logger.info("Retrying server connection (#%d)..." % tryno)
else:
logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
+
if not retries:
bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).")
bb.event.print_ui_queue()