* [PATCH] server/process: Fix missing log messages on server exception
@ 2016-05-12 23:22 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-05-12 23:22 UTC (permalink / raw)
To: bitbake-devel
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@linuxfoundation.org>
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 76011e9..982fcf7 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-12 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 23:22 [PATCH] server/process: Fix missing log messages on server exception Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.