summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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 /bitbake/lib
parentf5a344441ac9a6e2d829948050a1ba4c118c3ef5 (diff)
downloadpoky-dd43700b5d37f29effcb08c2d76874c11afd9b9f.tar.gz
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>
Diffstat (limited to 'bitbake/lib')
-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():
2092 found = False 2092 found = False
2093 index = self.queue.find("</event>") 2093 index = self.queue.find("</event>")
2094 while index != -1 and self.queue.startswith("<event>"): 2094 while index != -1 and self.queue.startswith("<event>"):
2095 event = pickle.loads(self.queue[7:index]) 2095 try:
2096 event = pickle.loads(self.queue[7:index])
2097 except ValueError as e:
2098 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[7:index]))
2096 bb.event.fire_from_worker(event, self.d) 2099 bb.event.fire_from_worker(event, self.d)
2097 found = True 2100 found = True
2098 self.queue = self.queue[index+8:] 2101 self.queue = self.queue[index+8:]
2099 index = self.queue.find("</event>") 2102 index = self.queue.find("</event>")
2100 index = self.queue.find("</exitcode>") 2103 index = self.queue.find("</exitcode>")
2101 while index != -1 and self.queue.startswith("<exitcode>"): 2104 while index != -1 and self.queue.startswith("<exitcode>"):
2102 task, status = pickle.loads(self.queue[10:index]) 2105 try:
2106 task, status = pickle.loads(self.queue[10:index])
2107 except ValueError as e:
2108 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[10:index]))
2103 self.rq.runqueue_process_waitpid(task, status) 2109 self.rq.runqueue_process_waitpid(task, status)
2104 found = True 2110 found = True
2105 self.queue = self.queue[index+11:] 2111 self.queue = self.queue[index+11:]