diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-25 18:43:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-26 14:52:14 +0100 |
commit | 99467c7e387f6e71358b40b8afae450d72cd68e0 (patch) | |
tree | 591fdf52249ed762e31e116f0b4bc91bd6c19884 /lib/bb/runqueue.py | |
parent | 7a5f776d325c0e37f58003424beda7cae2695325 (diff) | |
download | bitbake-99467c7e387f6e71358b40b8afae450d72cd68e0.tar.gz |
runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
There was a bug where an exception in the runqueue code would cause an infinite loop
of debug messages. The exception would get reported but would loop since runqueue was
still registered as an idle handler.
This patch adds an exception handler to ensure in the case of errors, the system
more gracefully shuts down and doesn't loop.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r-- | lib/bb/runqueue.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 306ae7933..292574133 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -862,7 +862,7 @@ class RunQueue: cache[task] = iscurrent return iscurrent - def execute_runqueue(self): + def _execute_runqueue(self): """ Run the tasks in a queue prepared by rqdata.prepare() Upon failure, optionally try to recover the build using any alternate providers @@ -926,6 +926,14 @@ class RunQueue: # Loop return retval + def execute_runqueue(self): + try: + return self._execute_runqueue() + except: + logger.error("An uncaught exception occured in runqueue, please see the failure below:") + self.state = runQueueComplete + raise + def finish_runqueue(self, now = False): if not self.rqexe: return |