summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJan Brzezanski <jan.brzezanski@gmail.com>2021-03-24 22:33:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-24 22:48:12 +0000
commit867a2067b29d54978a307691aa9081a77e533cc2 (patch)
tree4be9887d764afc7ad8d64688220531b365871808 /bitbake
parent0ddc879d61bb3e8b38e1181f4e4392b6c2122c2e (diff)
downloadpoky-867a2067b29d54978a307691aa9081a77e533cc2.tar.gz
bitbake: Force parser shutdown after catching an exception
Commit bebef58b21bdff7a3ee1fa2449b7df19144f26fd introduced forcing parser shutdown as default in case of build abort. In this case bitbake sometimes hangs after facing error during parsing, waiting for child processes to finish. Killing it then will spawn zombie processes. Thus we force the shutdown after catching an exception. (Bitbake rev: 5d02c98489d3a5836676b9c3fb3bd0157449db2b) Signed-off-by: Jan Brzezanski <jan.brzezanski@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 915330e1dbae1ee8fd9a0358decf2c294f771961) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 1f4cc1e96d..7ed0b802ca 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2207,18 +2207,18 @@ class CookerParser(object):
2207 except bb.BBHandledException as exc: 2207 except bb.BBHandledException as exc:
2208 self.error += 1 2208 self.error += 1
2209 logger.error('Failed to parse recipe: %s' % exc.recipe) 2209 logger.error('Failed to parse recipe: %s' % exc.recipe)
2210 self.shutdown(clean=False) 2210 self.shutdown(clean=False, force=True)
2211 return False 2211 return False
2212 except ParsingFailure as exc: 2212 except ParsingFailure as exc:
2213 self.error += 1 2213 self.error += 1
2214 logger.error('Unable to parse %s: %s' % 2214 logger.error('Unable to parse %s: %s' %
2215 (exc.recipe, bb.exceptions.to_string(exc.realexception))) 2215 (exc.recipe, bb.exceptions.to_string(exc.realexception)))
2216 self.shutdown(clean=False) 2216 self.shutdown(clean=False, force=True)
2217 return False 2217 return False
2218 except bb.parse.ParseError as exc: 2218 except bb.parse.ParseError as exc:
2219 self.error += 1 2219 self.error += 1
2220 logger.error(str(exc)) 2220 logger.error(str(exc))
2221 self.shutdown(clean=False) 2221 self.shutdown(clean=False, force=True)
2222 return False 2222 return False
2223 except bb.data_smart.ExpansionError as exc: 2223 except bb.data_smart.ExpansionError as exc:
2224 self.error += 1 2224 self.error += 1
@@ -2227,7 +2227,7 @@ class CookerParser(object):
2227 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback)) 2227 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback))
2228 logger.error('ExpansionError during parsing %s', value.recipe, 2228 logger.error('ExpansionError during parsing %s', value.recipe,
2229 exc_info=(etype, value, tb)) 2229 exc_info=(etype, value, tb))
2230 self.shutdown(clean=False) 2230 self.shutdown(clean=False, force=True)
2231 return False 2231 return False
2232 except Exception as exc: 2232 except Exception as exc:
2233 self.error += 1 2233 self.error += 1
@@ -2239,7 +2239,7 @@ class CookerParser(object):
2239 # Most likely, an exception occurred during raising an exception 2239 # Most likely, an exception occurred during raising an exception
2240 import traceback 2240 import traceback
2241 logger.error('Exception during parse: %s' % traceback.format_exc()) 2241 logger.error('Exception during parse: %s' % traceback.format_exc())
2242 self.shutdown(clean=False) 2242 self.shutdown(clean=False, force=True)
2243 return False 2243 return False
2244 2244
2245 self.current += 1 2245 self.current += 1