summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJan Brzezanski <jan.brzezanski@gmail.com>2021-04-06 04:43:02 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-04-06 22:45:36 +0100
commit5568e334d70213d611fd34910bdf4e4b00f09e99 (patch)
tree20c3d7414fa68e063ebd568c20cfced78b1529e0 /bitbake
parent80d619e771a6669ed181bc2d03fb54422a57ac76 (diff)
downloadpoky-5568e334d70213d611fd34910bdf4e4b00f09e99.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: 017a39ed05d065bf28fd38f91bcde8a098300551) 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: Steve Sakoman <steve@sakoman.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 d90bd3945f..11cc2b9546 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2126,18 +2126,18 @@ class CookerParser(object):
2126 except bb.BBHandledException as exc: 2126 except bb.BBHandledException as exc:
2127 self.error += 1 2127 self.error += 1
2128 logger.error('Failed to parse recipe: %s' % exc.recipe) 2128 logger.error('Failed to parse recipe: %s' % exc.recipe)
2129 self.shutdown(clean=False) 2129 self.shutdown(clean=False, force=True)
2130 return False 2130 return False
2131 except ParsingFailure as exc: 2131 except ParsingFailure as exc:
2132 self.error += 1 2132 self.error += 1
2133 logger.error('Unable to parse %s: %s' % 2133 logger.error('Unable to parse %s: %s' %
2134 (exc.recipe, bb.exceptions.to_string(exc.realexception))) 2134 (exc.recipe, bb.exceptions.to_string(exc.realexception)))
2135 self.shutdown(clean=False) 2135 self.shutdown(clean=False, force=True)
2136 return False 2136 return False
2137 except bb.parse.ParseError as exc: 2137 except bb.parse.ParseError as exc:
2138 self.error += 1 2138 self.error += 1
2139 logger.error(str(exc)) 2139 logger.error(str(exc))
2140 self.shutdown(clean=False) 2140 self.shutdown(clean=False, force=True)
2141 return False 2141 return False
2142 except bb.data_smart.ExpansionError as exc: 2142 except bb.data_smart.ExpansionError as exc:
2143 self.error += 1 2143 self.error += 1
@@ -2146,7 +2146,7 @@ class CookerParser(object):
2146 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback)) 2146 tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback))
2147 logger.error('ExpansionError during parsing %s', value.recipe, 2147 logger.error('ExpansionError during parsing %s', value.recipe,
2148 exc_info=(etype, value, tb)) 2148 exc_info=(etype, value, tb))
2149 self.shutdown(clean=False) 2149 self.shutdown(clean=False, force=True)
2150 return False 2150 return False
2151 except Exception as exc: 2151 except Exception as exc:
2152 self.error += 1 2152 self.error += 1
@@ -2158,7 +2158,7 @@ class CookerParser(object):
2158 # Most likely, an exception occurred during raising an exception 2158 # Most likely, an exception occurred during raising an exception
2159 import traceback 2159 import traceback
2160 logger.error('Exception during parse: %s' % traceback.format_exc()) 2160 logger.error('Exception during parse: %s' % traceback.format_exc())
2161 self.shutdown(clean=False) 2161 self.shutdown(clean=False, force=True)
2162 return False 2162 return False
2163 2163
2164 self.current += 1 2164 self.current += 1