From: Martin Jansa Date: Sun, 23 Feb 2014 10:02:18 +0000 (+0100) Subject: bitbake: runqueue: Catch ValueError from pickle.loads X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd43700b5d37f29effcb08c2d76874c11afd9b9f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: runqueue: Catch ValueError from pickle.loads * exception like this keeps spinning quite quickly generating GBs of logs better to kill it asap and show invalid pickle (Bitbake rev: a69eb4c12c71bba9d742c4e5578f25c388d9f825) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 413d59f8f4f..bc48684d78d 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -2092,14 +2092,20 @@ class runQueuePipe(): found = False index = self.queue.find("") while index != -1 and self.queue.startswith(""): - event = pickle.loads(self.queue[7:index]) + try: + event = pickle.loads(self.queue[7:index]) + except ValueError as e: + bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[7:index])) bb.event.fire_from_worker(event, self.d) found = True self.queue = self.queue[index+8:] index = self.queue.find("") index = self.queue.find("") while index != -1 and self.queue.startswith(""): - task, status = pickle.loads(self.queue[10:index]) + try: + task, status = pickle.loads(self.queue[10:index]) + except ValueError as e: + bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[10:index])) self.rq.runqueue_process_waitpid(task, status) found = True self.queue = self.queue[index+11:]