[oe-commits] [bitbake] 06/25: server/process: Fix missing log messages issue

git at git.openembedded.org git at git.openembedded.org
Fri May 13 16:47:13 UTC 2016


rpurdie pushed a commit to branch python3
in repository bitbake.

commit fa898db6db20650325b5d90a8bbc6fcef509ec3b
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu May 12 23:27:25 2016 +0100

    server/process: Fix missing log messages issue
    
    Currently if the server dies, its possible that log messages are never
    displayed which is particularly problematic if one of those messages
    is the exception and backtrace the server died with.
    
    Rather than having the event queue exit as soon as the server disappears,
    we should pop events from the queue until its empty before exiting.
    
    This patch tweaks that code so that even if the server is dead and we're
    going to exit, we return any events left in the pipe. This makes
    debugging certain failures much easier.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/server/process.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 76011e9..982fcf7 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -222,11 +222,10 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
 
     def waitEvent(self, timeout):
         if self.exit:
-            sys.exit(1)
+            return self.getEvent()
         try:
             if not self.server.is_alive():
-                self.setexit()
-                return None
+                return self.getEvent()
             return self.get(True, timeout)
         except Empty:
             return None
@@ -235,9 +234,10 @@ class ProcessEventQueue(multiprocessing.queues.Queue):
         try:
             if not self.server.is_alive():
                 self.setexit()
-                return None
             return self.get(False)
         except Empty:
+            if self.exit:
+                sys.exit(1)
             return None
 
 

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


More information about the Openembedded-commits mailing list