summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbst-marge-bot <marge-bot@buildstream.build>2020-05-15 15:27:41 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-05-15 15:27:41 +0000
commit4819011147ab67462d9e378938a9139b479d5fe7 (patch)
treef0f8daecfc1b1a35f05c204545dcbf4e516404ab
parentdd2eb18bfc60cef39c9aa478397a4ff9a6c87a1d (diff)
parentbe2a3e6a89cdbafeaa5414f74f73d6ebd598ef55 (diff)
downloadbuildstream-4819011147ab67462d9e378938a9139b479d5fe7.tar.gz
Merge branch 'ctolentino/check-casd-process' into 'master'
Check that buildbox-casd process is not a zombie Closes #1311 See merge request BuildStream/buildstream!1930
-rw-r--r--src/buildstream/_cas/casdprocessmanager.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/buildstream/_cas/casdprocessmanager.py b/src/buildstream/_cas/casdprocessmanager.py
index 9536d9f8d..fb2ee51fe 100644
--- a/src/buildstream/_cas/casdprocessmanager.py
+++ b/src/buildstream/_cas/casdprocessmanager.py
@@ -250,6 +250,9 @@ class CASDChannel:
# check that process is still alive
try:
proc = psutil.Process(self._casd_pid)
+ if proc.status() == psutil.STATUS_ZOMBIE:
+ proc.wait()
+
if not proc.is_running():
raise CASCacheError("buildbox-casd process died before connection could be established")
except psutil.NoSuchProcess: