summaryrefslogtreecommitdiffstats
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:47:49 +0000
commit5d02c98489d3a5836676b9c3fb3bd0157449db2b (patch)
tree5b70332a80aa1fa66600f7537bad58cdaeaf2651
parent947c2ad65e4c59d01c603f767f11f9aa86b69264 (diff)
downloadbitbake-5d02c98489d3a5836676b9c3fb3bd0157449db2b.tar.gz
Force parser shutdown after catching an exception2020-10.3-gatesgarth1.48.3
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. 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>
-rw-r--r--lib/bb/cooker.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 1f4cc1e96..7ed0b802c 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -2207,18 +2207,18 @@ class CookerParser(object):
except bb.BBHandledException as exc:
self.error += 1
logger.error('Failed to parse recipe: %s' % exc.recipe)
- self.shutdown(clean=False)
+ self.shutdown(clean=False, force=True)
return False
except ParsingFailure as exc:
self.error += 1
logger.error('Unable to parse %s: %s' %
(exc.recipe, bb.exceptions.to_string(exc.realexception)))
- self.shutdown(clean=False)
+ self.shutdown(clean=False, force=True)
return False
except bb.parse.ParseError as exc:
self.error += 1
logger.error(str(exc))
- self.shutdown(clean=False)
+ self.shutdown(clean=False, force=True)
return False
except bb.data_smart.ExpansionError as exc:
self.error += 1
@@ -2227,7 +2227,7 @@ class CookerParser(object):
tb = list(itertools.dropwhile(lambda e: e.filename.startswith(bbdir), exc.traceback))
logger.error('ExpansionError during parsing %s', value.recipe,
exc_info=(etype, value, tb))
- self.shutdown(clean=False)
+ self.shutdown(clean=False, force=True)
return False
except Exception as exc:
self.error += 1
@@ -2239,7 +2239,7 @@ class CookerParser(object):
# Most likely, an exception occurred during raising an exception
import traceback
logger.error('Exception during parse: %s' % traceback.format_exc())
- self.shutdown(clean=False)
+ self.shutdown(clean=False, force=True)
return False
self.current += 1