diff --git a/fix-the-sentryCollector-service-can-t-be-stopped-for.patch b/fix-the-sentryCollector-service-can-t-be-stopped-for.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7bb9c2ccaebac8f3067515b07b70ac8e798aeb2 --- /dev/null +++ b/fix-the-sentryCollector-service-can-t-be-stopped-for.patch @@ -0,0 +1,37 @@ +From 93a58d1e0faee37cbc27981c85f41c50e81bdc66 Mon Sep 17 00:00:00 2001 +From: zhuofeng <1107893276@qq.com> +Date: Mon, 24 Feb 2025 03:00:57 +0000 +Subject: [PATCH] fix the sentryCollector service can't be stopped for a long + time. + +Signed-off-by: zhuofeng <1107893276@qq.com> +--- + src/services/sentryCollector/collect_io.py | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/services/sentryCollector/collect_io.py b/src/services/sentryCollector/collect_io.py +index 10446d9..6db28ec 100644 +--- a/src/services/sentryCollector/collect_io.py ++++ b/src/services/sentryCollector/collect_io.py +@@ -405,10 +405,17 @@ class CollectIo(): + self + ) -> None: + global EBPF_PROCESS +- if EBPF_PROCESS: ++ if not EBPF_PROCESS: ++ logging.debug("No eBPF process to stop") ++ return ++ try: + EBPF_PROCESS.terminate() ++ EBPF_PROCESS.wait(timeout=3) ++ except subprocess.TimeoutExpired: ++ logging.debug("eBPF process did not exit within timeout. Forcing kill.") ++ EBPF_PROCESS.kill() + EBPF_PROCESS.wait() +- logging.info("ebpf collector thread exit") ++ logging.info("ebpf collector thread exit") + + def main_loop(self): + global IO_GLOBAL_DATA +-- +2.43.0 diff --git a/sysSentry.spec b/sysSentry.spec index c4248c22cdc83be9476e51147e4d6f849a87b090..ba9addceeb39129a4592e49e63352ee842e02ec9 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.3 -Release: 6 +Release: 7 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -14,6 +14,7 @@ Patch2: fix-some-test-cases.patch Patch3: add-log-for-xalarmd-and-fix-delete-on-iter-problem.patch Patch4: fix-xalarm-log-not-print-and-add-on-iter-problem.patch Patch5: add-new-func-for-ebpf-in-the-rq_driver-stage.patch +Patch6: fix-the-sentryCollector-service-can-t-be-stopped-for.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -210,6 +211,12 @@ rm -rf /var/run/sysSentry | : %attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py %changelog +* Mon Feb 24 2025 zhuofeng - 1.0.3-7 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: fix the sentryCollector service can't be stopped for a long + * Sat Feb 22 2025 zhuofeng - 1.0.3-6 - Type:bugfix - CVE:NA