From 1e612a61b33ab121b89fb919d2fda56382d10b1f Mon Sep 17 00:00:00 2001 From: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> Date: Thu, 15 Apr 2021 09:58:39 -0700 Subject: [PATCH] [CIFuzz] Ensure we don't through exception if we can't stop container (#5622) It's probably fine to run another one, so just do that. Also increase the amount of time we will wait to 5 seconds. Fixes https://github.com/google/oss-fuzz/issues/5621 --- infra/cifuzz/docker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infra/cifuzz/docker.py b/infra/cifuzz/docker.py index 28ae18096..e9331357f 100644 --- a/infra/cifuzz/docker.py +++ b/infra/cifuzz/docker.py @@ -70,7 +70,11 @@ def _handle_timed_out_container_process(process, cid_filename): return None, None # Use a timeout so we don't wait forever. - return process.communicate(timeout=1) + try: + return process.communicate(timeout=5) + except subprocess.TimeoutExpired: + logging.error('Docker container still running after stop attempt.') + return None, None def run_container_command(command_arguments, timeout=None):