From a946ca2daf22ce412d7a3099b9b62cc3e1aa8334 Mon Sep 17 00:00:00 2001 From: s0me0ne-unkn0wn <48632512+s0me0ne-unkn0wn@users.noreply.github.com> Date: Thu, 30 Mar 2023 21:41:54 +0200 Subject: [PATCH] Use `SIGTERM` instead of `SIGKILL` on PVF worker version mismatch (#6981) --- polkadot/node/core/pvf/src/worker_common.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polkadot/node/core/pvf/src/worker_common.rs b/polkadot/node/core/pvf/src/worker_common.rs index 3ed2994a2f..11b2050f2b 100644 --- a/polkadot/node/core/pvf/src/worker_common.rs +++ b/polkadot/node/core/pvf/src/worker_common.rs @@ -416,7 +416,7 @@ pub async fn framed_recv(r: &mut (impl AsyncRead + Unpin)) -> io::Result Ok(buf) } -/// In case of node and worker version mismatch (as a result of in-place upgrade), send `SIGKILL` +/// In case of node and worker version mismatch (as a result of in-place upgrade), send `SIGTERM` /// to the node to tear it down and prevent it from raising disputes on valid candidates. Node /// restart should be handled by the node owner. As node exits, unix sockets opened to workers /// get closed by the OS and other workers receive error on socket read and also exit. Preparation @@ -428,7 +428,7 @@ pub(crate) fn kill_parent_node_in_emergency() { // some corner cases, which is checked. `kill()` never fails. let ppid = libc::getppid(); if ppid > 1 { - libc::kill(ppid, libc::SIGKILL); + libc::kill(ppid, libc::SIGTERM); } } }