sos/sos-bz2012859-plugin-timeout-unhandled-exception.patch
Pavel Moravec b6c480a921 sos updates to RHEL 9.0 GA
Resolves: bz2011537 bz2012859 bz2020778 bz2023481

Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
2021-11-15 22:35:41 +01:00

32 lines
1.0 KiB
Diff

From a93e118a9c88df52fd2c701d2276185f877d565c Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
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 <pmoravec@redhat.com>
---
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