[bitbake-devel] [PATCH 1/2] cooker: Cleanup the queue before call process.join()
Robert Yang
liezhi.yang at windriver.com
Wed Aug 7 09:50:48 UTC 2019
Fixed:
$ rm -fr tmp-glibc/cache/default-glibc/qemux86/x86_64/bb_cache.dat* ; bitbake -p
Press *one* Ctrl-C when the parsing process is at about 50%, then the processes
are not exited:
Keyboard Interrupt, closing down...
Timeout while waiting for a reply from the bitbake server
It hangs at process.join(), according to:
https://docs.python.org/3.7/library/multiprocessing.html
Cleanup the queue before call process.join() can fix the problem.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
bitbake/lib/bb/cooker.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 6e1d59b..ec1b35d 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2077,6 +2077,14 @@ class CookerParser(object):
for process in self.processes:
self.parser_quit.put(None)
+ # 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:
if force:
process.join(.1)
--
2.7.4
More information about the bitbake-devel
mailing list