From a93e118a9c88df52fd2c701d2276185f877d565c Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Wed, 3 Nov 2021 16:07:15 +0100 Subject: [PATCH] [report] shutdown threads for timeouted plugins Wait for shutting down threads of timeouted plugins, to prevent them in writing to moved auxiliary files like sos_logs/sos.log Resolves: #2722 Closes: #2746 Signed-off-by: Pavel Moravec --- sos/report/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sos/report/__init__.py b/sos/report/__init__.py index 1b5bc97d..ef86b28d 100644 --- a/sos/report/__init__.py +++ b/sos/report/__init__.py @@ -1046,6 +1046,7 @@ class SoSReport(SoSComponent): self.ui_log.error("\n Plugin %s timed out\n" % plugin[1]) self.running_plugs.remove(plugin[1]) self.loaded_plugins[plugin[0]-1][1].set_timeout_hit() + pool.shutdown(wait=True) pool._threads.clear() if self.opts.estimate_only: from pathlib import Path -- 2.31.1