buildman: Provide a hint on how to debug thread crashes

If a thread crashes it is helpful to try the operation again with
threading disabled. Add a hint about that.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2022-01-22 05:07:32 -07:00 committed by Tom Rini
parent 19133b7184
commit 8ca0931a91
2 changed files with 4 additions and 2 deletions

View file

@ -557,6 +557,6 @@ class BuilderThread(threading.Thread):
try:
self.RunJob(job)
except Exception as e:
print('Thread exception:', e)
print('Thread exception (use -T0 to run without threads):', e)
self.builder.thread_exceptions.append(e)
self.builder.queue.task_done()

View file

@ -623,4 +623,6 @@ class TestFunctional(unittest.TestCase):
with test_util.capture_sys_output() as (stdout, stderr):
self.assertEqual(102, self._RunControl('-o', self._output_dir,
test_thread_exceptions=True))
self.assertIn('Thread exception: test exception', stdout.getvalue())
self.assertIn(
'Thread exception (use -T0 to run without threads): test exception',
stdout.getvalue())