From f9f8acb208aa8256ba89163f6101a77608dba908 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Fri, 29 May 2026 10:22:36 -0400 Subject: [PATCH] fix: Killing processes does not take place when they are in D-State This issue occurs after a database restart or when running a systemctl restart flow-capture. There are two change elements. The first is moving the systemd KillMode to mixed which signals the parent with a SIGTERM and children processes with a SIGKILL, and changing the internal signaling process to always use a SIGKILL. --- CHANGELOG.md | 1 + service/flow-capture | 2 +- service/flow-capture.service | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b507e0..a666a35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ --- develop --- * issue#240: Call to db_table_exists is incorrect in some cases +* issue: Killing processes does not occur when they are in D-State --- 5.0 --- diff --git a/service/flow-capture b/service/flow-capture index 5a9fda5..dbbce99 100644 --- a/service/flow-capture +++ b/service/flow-capture @@ -313,7 +313,7 @@ function flowview_kill_running_processes() { foreach($processes as $p) { cacti_log(sprintf('WARNING: Killing FlowView Child: %s PID: %d due to another due to signal or overrun.', ucfirst($p['taskname']), $p['pid']), false, 'FLOWVIEW'); - posix_kill($p['pid'], SIGTERM); + posix_kill($p['pid'], SIGKILL); unregister_process($p['tasktype'], $p['taskname'], $p['taskid'], $p['pid']); } diff --git a/service/flow-capture.service b/service/flow-capture.service index 6263b45..5612908 100644 --- a/service/flow-capture.service +++ b/service/flow-capture.service @@ -27,7 +27,7 @@ After=network.target mariadb.service User=apache TimeoutStartSec=0 Type=simple -KillMode=process +KillMode=mixed WorkingDirectory=/tmp ExecStart=/usr/bin/php -q /var/www/html/cacti/plugins/flowview/service/flow-capture --systemd ExecStop=/usr/bin/php -q /var/www/html/cacti/plugins/flowview/service/flow-capture stop