[oe-commits] [bitbake] 01/02: cooker: Cleanup the queue before call process.join()

git at git.openembedded.org git at git.openembedded.org
Wed Aug 7 18:44:19 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 3eddfadd19b2ce4c061861abf0c340e3825b41ff
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Wed Aug 7 17:50:48 2019 +0800

    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.
    
    Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/cooker.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 6e1d59b..ec1b35d 100644
--- a/lib/bb/cooker.py
+++ b/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)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list