summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-05 13:08:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-06 06:34:58 +0100
commitdc7ef0f896ff7abeb2296fa420ba5219b9455959 (patch)
tree7380c5128e263970c6ea75874c5c30707d4ff7b4 /bitbake/lib/bb/server
parent7f0f1179eb02c3bb84ffe01f102375dc1186136e (diff)
downloadpoky-dc7ef0f896ff7abeb2296fa420ba5219b9455959.tar.gz
bitbake: process: Improve traceback error reporting from main loop
Currently the code can just show nothing as the exception if there was a double fault, which in this code path is quite likely. This leads to an error log which effectively says "it failed" with no information about how. Improve things so we get a nice verbose traceback left in the logs/output which is preferable to no logs. (Bitbake rev: e5782b71647d1eb6de53bde7bc4f6019a5589f21) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index a0955722e3..6127fd40e6 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -26,6 +26,7 @@ import errno
26import re 26import re
27import datetime 27import datetime
28import pickle 28import pickle
29import traceback
29import bb.server.xmlrpcserver 30import bb.server.xmlrpcserver
30from bb import daemonize 31from bb import daemonize
31from multiprocessing import queues 32from multiprocessing import queues
@@ -217,8 +218,9 @@ class ProcessServer():
217 self.command_channel_reply.send(self.cooker.command.runCommand(command)) 218 self.command_channel_reply.send(self.cooker.command.runCommand(command))
218 serverlog("Command Completed") 219 serverlog("Command Completed")
219 except Exception as e: 220 except Exception as e:
220 serverlog('Exception in server main event loop running command %s (%s)' % (command, str(e))) 221 stack = traceback.format_exc()
221 logger.exception('Exception in server main event loop running command %s (%s)' % (command, str(e))) 222 serverlog('Exception in server main event loop running command %s (%s)' % (command, stack))
223 logger.exception('Exception in server main event loop running command %s (%s)' % (command, stack))
222 224
223 if self.xmlrpc in ready: 225 if self.xmlrpc in ready:
224 self.xmlrpc.handle_requests() 226 self.xmlrpc.handle_requests()