summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJan Brzezanski <jan.brzezanski@gmail.com>2021-02-18 17:53:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-21 22:01:56 +0000
commit90e5cce0e31ed40c17b6cfed46945c8536c99ee3 (patch)
treefc3281c5bbb249a8eac5e1bb26cdf0cee8c42c04 /bitbake
parent4952dcbd518165b676111d318c36ebbce8f8f703 (diff)
downloadpoky-90e5cce0e31ed40c17b6cfed46945c8536c99ee3.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: 915330e1dbae1ee8fd9a0358decf2c294f771961) Signed-off-by: Jan Brzezanski <jan.brzezanski@gmail.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 0e492b9be9..f4ab797edf 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2211,18 +2211,18 @@ class CookerParser(object):
2211 except bb.BBHandledException as exc: 2211 except bb.BBHandledException as exc:
2212 self.error += 1 2212 self.error += 1
2213 logger.error('Failed to parse recipe: %s' % exc.recipe) 2213 logger.error('Failed to parse recipe: %s' % exc.recipe)
2214 self.shutdown(clean=False) 2214 self.shutdown(clean=False, force=True)
2215 return False 2215 return False
2216 except ParsingFailure as exc: 2216 except ParsingFailure as exc:
2217 self.error += 1 2217 self.error += 1
2218 logger.error('Unable to parse %s: %s' % 2218 logger.error('Unable to parse %s: %s' %
2219 (exc.recipe, bb.exceptions.to_string(exc.realexception))) 2219 (exc.recipe, bb.exceptions.to_string(exc.realexception)))
2220 self.shutdown(clean=False) 2220 self.shutdown(clean=False, force=True)
2221 return False 2221 return False
2222 except bb.parse.ParseError as exc: 2222 except bb.parse.ParseError as exc:
2223 self.error += 1 2223 self.error += 1
2224 logger.error(str(exc)) 2224 logger.error(str(exc))
2225 self.shutdown(clean=False) 2225 self.shutdown(clean=False, force=True)
2226 return False 2226 return False
2227 except bb.data_smart.ExpansionError as exc: 2227 except bb.data_smart.ExpansionError as exc:
2228 self.error += 1 2228 self.error += 1
@@ -2231,7 +2231,7 @@ class CookerParser(object):
2231 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback)) 2231 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback))
2232 logger.error('ExpansionError during parsing %s', value.recipe, 2232 logger.error('ExpansionError during parsing %s', value.recipe,
2233 exc_info=(etype, value, tb)) 2233 exc_info=(etype, value, tb))
2234 self.shutdown(clean=False) 2234 self.shutdown(clean=False, force=True)
2235 return False 2235 return False
2236 except Exception as exc: 2236 except Exception as exc:
2237 self.error += 1 2237 self.error += 1
@@ -2243,7 +2243,7 @@ class CookerParser(object):
2243 # Most likely, an exception occurred during raising an exception 2243 # Most likely, an exception occurred during raising an exception
2244 import traceback 2244 import traceback
2245 logger.error('Exception during parse: %s' % traceback.format_exc()) 2245 logger.error('Exception during parse: %s' % traceback.format_exc())
2246 self.shutdown(clean=False) 2246 self.shutdown(clean=False, force=True)
2247 return False 2247 return False
2248 2248
2249 self.current += 1 2249 self.current += 1