summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/runqueue.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index adb34a8cf2..02a261e30c 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -2967,7 +2967,12 @@ class runQueuePipe():
2967 while index != -1 and self.queue.startswith(b"<event>"): 2967 while index != -1 and self.queue.startswith(b"<event>"):
2968 try: 2968 try:
2969 event = pickle.loads(self.queue[7:index]) 2969 event = pickle.loads(self.queue[7:index])
2970 except ValueError as e: 2970 except (ValueError, pickle.UnpicklingError, AttributeError, IndexError) as e:
2971 if isinstance(e, pickle.UnpicklingError) and "truncated" in str(e):
2972 # The pickled data could contain "</event>" so search for the next occurance
2973 # unpickling again, this should be the only way an unpickle error could occur
2974 index = self.queue.find(b"</event>", index + 1)
2975 continue
2971 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[7:index])) 2976 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[7:index]))
2972 bb.event.fire_from_worker(event, self.d) 2977 bb.event.fire_from_worker(event, self.d)
2973 if isinstance(event, taskUniHashUpdate): 2978 if isinstance(event, taskUniHashUpdate):
@@ -2979,7 +2984,7 @@ class runQueuePipe():
2979 while index != -1 and self.queue.startswith(b"<exitcode>"): 2984 while index != -1 and self.queue.startswith(b"<exitcode>"):
2980 try: 2985 try:
2981 task, status = pickle.loads(self.queue[10:index]) 2986 task, status = pickle.loads(self.queue[10:index])
2982 except ValueError as e: 2987 except (ValueError, pickle.UnpicklingError, AttributeError, IndexError) as e:
2983 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[10:index])) 2988 bb.msg.fatal("RunQueue", "failed load pickle '%s': '%s'" % (e, self.queue[10:index]))
2984 self.rqexec.runqueue_process_waitpid(task, status) 2989 self.rqexec.runqueue_process_waitpid(task, status)
2985 found = True 2990 found = True