diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-05 13:08:56 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-06 06:34:58 +0100 |
commit | dc7ef0f896ff7abeb2296fa420ba5219b9455959 (patch) | |
tree | 7380c5128e263970c6ea75874c5c30707d4ff7b4 /bitbake | |
parent | 7f0f1179eb02c3bb84ffe01f102375dc1186136e (diff) | |
download | poky-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')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 6 |
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 | |||
26 | import re | 26 | import re |
27 | import datetime | 27 | import datetime |
28 | import pickle | 28 | import pickle |
29 | import traceback | ||
29 | import bb.server.xmlrpcserver | 30 | import bb.server.xmlrpcserver |
30 | from bb import daemonize | 31 | from bb import daemonize |
31 | from multiprocessing import queues | 32 | from 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() |