From dd43700b5d37f29effcb08c2d76874c11afd9b9f Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sun, 23 Feb 2014 11:02:18 +0100 Subject: 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 --- bitbake/lib/bb/runqueue.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 413d59f8f4..bc48684d78 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:] -- cgit v1.2.3-54-g00ecf