@@ -2233,6 +2233,14 @@ class CookerParser(object):
else:
bb.error("Parsing halted due to errors, see error messages above")
+ # Cleanup the queue before call process.join(), otherwise there might be
+ # deadlocks.
+ while True:
+ try:
+ self.result_queue.get(timeout=0.25)
+ except queue.Empty:
+ break
+
def sync_caches():
for c in self.bb_caches.values():
bb.cache.SiggenRecipeInfo.reset()
@@ -2243,14 +2251,6 @@ class CookerParser(object):
self.parser_quit.set()
- # Cleanup the queue before call process.join(), otherwise there might be
- # deadlocks.
- while True:
- try:
- self.result_queue.get(timeout=0.25)
- except queue.Empty:
- break
-
for process in self.processes:
process.join(0.5)
When draining the result queue from the parsing processes, cache objects can be created even if they are then immediately destroyed. The reset in the sync code needs to happen after any objects have been created. Change the ordering to fix this. This ordering has caused various cache errors, particularly when interrupting parsing with Ctrl+C. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/cooker.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)