[gnome-continuous-yocto/gnomeostree-3.28-rocko: 302/8267] bitbake: server/process: Fix missing log messages issue
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 302/8267] bitbake: server/process: Fix missing log messages issue
- Date: Sat, 16 Dec 2017 20:14:11 +0000 (UTC)
commit bfc21fd9b23ff62c1dc422b606b289f2457f29e5
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Thu May 12 23:27:25 2016 +0100
bitbake: 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.
(Bitbake rev: 29f6ade68fb2b506a23a7eb3a00cdcffa291b362)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/server/process.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index a3078a8..cc58c72 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]