All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code
@ 2012-07-25 19:16 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2012-07-25 19:16 UTC (permalink / raw)
  To: bitbake-devel

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>
---
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 306ae79..2925741 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/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





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-25 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 19:16 [PATCH] runqueue.py: Gracefully exit if an exception occurs in the runqueue execution code Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.