summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-08-07 17:50:48 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-08 10:22:36 +0100
commit016b91b334c17cf542711a90fcde8d7278867eb0 (patch)
tree1b9f818c510552e9e04975b6a41880ec8a95c9a6 /bitbake/lib
parent53b602c4e46e770df6794fd9cac99d25c2e7622f (diff)
downloadpoky-016b91b334c17cf542711a90fcde8d7278867eb0.tar.gz
bitbake: cooker: Cleanup the queue before call process.join()
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. (Bitbake rev: 3eddfadd19b2ce4c061861abf0c340e3825b41ff) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 6e1d59bb3a..ec1b35d724 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2077,6 +2077,14 @@ class CookerParser(object):
2077 for process in self.processes: 2077 for process in self.processes:
2078 self.parser_quit.put(None) 2078 self.parser_quit.put(None)
2079 2079
2080 # Cleanup the queue before call process.join(), otherwise there might be
2081 # deadlocks.
2082 while True:
2083 try:
2084 self.result_queue.get(timeout=0.25)
2085 except queue.Empty:
2086 break
2087
2080 for process in self.processes: 2088 for process in self.processes:
2081 if force: 2089 if force:
2082 process.join(.1) 2090 process.join(.1)