[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
This commit is contained in:
jonathanmetzman 2021-04-15 09:58:39 -07:00 committed by GitHub
parent f9d23f5297
commit 1e612a61b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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):