diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-02 11:56:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-03 17:00:57 +0100 |
commit | 97e19bf73b024bc691e56c315ec7eb378a8cf7dd (patch) | |
tree | 4f256d8dc7cdef236c3d6c16f8279a865c27f2a1 /bitbake/lib/bb/main.py | |
parent | 53138165bc1098f2a80be19065dd6f5a30cb6431 (diff) | |
download | poky-97e19bf73b024bc691e56c315ec7eb378a8cf7dd.tar.gz |
bitbake: main: Alter EOFError handling
If the server shuts down 'cleanly' due to some issue, the socket will close.
A recently reported example was an invalid PRSERV being set. Doing this silently
and without changing the retries count will case the server startup to loop
infinitely.
Change the code so it triggers the usual retries note messages and times
out eventually pointing the user at the cooker log file.
[YOCTO #12984]
(Bitbake rev: bb696636ef0c59f9e9640bb9460e7cce323cc785)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/main.py')
-rwxr-xr-x | bitbake/lib/bb/main.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index a1226886c0..3071141b55 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -447,12 +447,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): | |||
447 | bb.utils.unlockfile(lock) | 447 | bb.utils.unlockfile(lock) |
448 | raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?") | 448 | raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?") |
449 | if not configParams.server_only: | 449 | if not configParams.server_only: |
450 | try: | 450 | server_connection = bb.server.process.connectProcessServer(sockname, featureset) |
451 | server_connection = bb.server.process.connectProcessServer(sockname, featureset) | ||
452 | except EOFError: | ||
453 | # The server may have been shutting down but not closed the socket yet. If that happened, | ||
454 | # ignore it. | ||
455 | pass | ||
456 | 451 | ||
457 | if server_connection or configParams.server_only: | 452 | if server_connection or configParams.server_only: |
458 | break | 453 | break |
@@ -463,7 +458,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): | |||
463 | raise | 458 | raise |
464 | retries -= 1 | 459 | retries -= 1 |
465 | tryno = 8 - retries | 460 | tryno = 8 - retries |
466 | if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)): | 461 | if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError)): |
467 | logger.info("Retrying server connection (#%d)..." % tryno) | 462 | logger.info("Retrying server connection (#%d)..." % tryno) |
468 | else: | 463 | else: |
469 | logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc())) | 464 | logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc())) |