summaryrefslogtreecommitdiffstats
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:12:42 +0000
commitc0f18b8bf56a730032fd06a5796caab70cd52379 (patch)
treecbcab01bb4a5e4cdaa0f80584bfaa982a8aacb5e
parent8de1cd3886c6ac2544849e9e36bb7c66303ceb10 (diff)
downloadpoky-c0f18b8bf56a730032fd06a5796caab70cd52379.tar.gz
bitbake: main: Handle cooker daemon startup error
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] (Bitbake rev: fec2b85689bba1d26ad6f376bc11cc29bb27cbe5) Signed-off-by: Stacy Gaikovaia <stacy.gaikovaia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 7990195eac..e92e409f07 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -456,15 +456,17 @@ def setup_bitbake(configParams, extrafeatures=None):
456 break 456 break
457 except BBMainFatal: 457 except BBMainFatal:
458 raise 458 raise
459 except (Exception, bb.server.process.ProcessTimeout) as e: 459 except (Exception, bb.server.process.ProcessTimeout, SystemExit) as e:
460 # SystemExit does not inherit from the Exception class, needs to be included explicitly
460 if not retries: 461 if not retries:
461 raise 462 raise
462 retries -= 1 463 retries -= 1
463 tryno = 8 - retries 464 tryno = 8 - retries
464 if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError)): 465 if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError, SystemExit)):
465 logger.info("Retrying server connection (#%d)..." % tryno) 466 logger.info("Retrying server connection (#%d)..." % tryno)
466 else: 467 else:
467 logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc())) 468 logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
469
468 if not retries: 470 if not retries:
469 bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).") 471 bb.fatal("Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).")
470 bb.event.print_ui_queue() 472 bb.event.print_ui_queue()