Skip to contentSkip to conversation

cooker: Ensure parser replacement calls parser final_cleanup

PATCH New Richard Purdie 1 participant 2 messages Sep 4, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cooker: Ensure parser replacement calls parser final_cleanup

This could potentialy account for some of the missing thread cleanup we're seeing.

---
 lib/bb/cooker.py | 1 +
 1 file changed, 1 insertion(+)
lib/bb/cooker.py +1 -0
index beb72958af..ac64b0e1bc 100644
@@ -1563,6 +1563,7 @@ class BBCooker:
         if self.state in (state.shutdown, state.forceshutdown, state.error):
             if hasattr(self.parser, 'shutdown'):
                 self.parser.shutdown(clean=False, force = True)
+                self.parser.final_cleanup()
             raise bb.BBHandledException()
 
         if self.state != state.parsing:
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 cooker: Assign a name to the sync thread to aid debugging

---
 lib/bb/cooker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/cooker.py +1 -1
index ac64b0e1bc..30d7278505 100644
@@ -2151,7 +2151,7 @@ class CookerParser(object):
             for c in self.bb_caches.values():
                 c.sync()
 
-        sync = threading.Thread(target=sync_caches)
+        sync = threading.Thread(target=sync_caches, name="SyncThread")
         self.syncthread = sync
         sync.start()
         bb.codeparser.parser_cache_savemerge()
Signature · 1 line
2.25.1