Blame SOURCES/sos-bz2012859-plugin-timeout-unhandled-exception.patch

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