summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2014-02-23 11:02:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-24 12:42:40 +0000
commitdd43700b5d37f29effcb08c2d76874c11afd9b9f (patch)
treec738dd00118d326968685b659857ee2dd7fd8917
parentf5a344441ac9a6e2d829948050a1ba4c118c3ef5 (diff)
downloadpoky-dd43700b5d37f29effcb08c2d76874c11afd9b9f.tar.gz
poky-dd43700b5d37f29effcb08c2d76874c11afd9b9f.tar.bz2
poky-dd43700b5d37f29effcb08c2d76874c11afd9b9f.zip
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 <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/runqueue.py10
1 files 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("</event>")
while index != -1 and self.queue.startswith("<event>"):
- 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("</event>")
index = self.queue.find("</exitcode>")
while index != -1 and self.queue.startswith("<exitcode>"):
- 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:]