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

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