[oe-commits] [bitbake] 03/03: main: Alter EOFError handling

git at git.openembedded.org git at git.openembedded.org
Tue Jul 2 11:23:16 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit bb696636ef0c59f9e9640bb9460e7cce323cc785
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Jul 2 11:56:31 2019 +0100

    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]
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/main.py | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/lib/bb/main.py b/lib/bb/main.py
index a122688..3071141 100755
--- a/lib/bb/main.py
+++ b/lib/bb/main.py
@@ -447,12 +447,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
                             bb.utils.unlockfile(lock)
                         raise bb.server.process.ProcessTimeout("Bitbake still shutting down as socket exists but no lock?")
                 if not configParams.server_only:
-                    try:
-                        server_connection = bb.server.process.connectProcessServer(sockname, featureset)
-                    except EOFError:
-                        # The server may have been shutting down but not closed the socket yet. If that happened,
-                        # ignore it.
-                        pass
+                    server_connection = bb.server.process.connectProcessServer(sockname, featureset)
 
                 if server_connection or configParams.server_only:
                     break
@@ -463,7 +458,7 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
                     raise
                 retries -= 1
                 tryno = 8 - retries
-                if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)):
+                if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError, EOFError)):
                     logger.info("Retrying server connection (#%d)..." % tryno)
                 else:
                     logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list