From: Michael Meffie Date: Wed, 1 Aug 2012 15:42:34 +0000 (-0400) Subject: bozo: avoid canceling the sigkill timer for hung processes X-Git-Tag: upstream/1.8.0_pre1^2~2121 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=09f5a1e6053e6db3df581543875512d8cff259ae;p=packages%2Fo%2Fopenafs.git bozo: avoid canceling the sigkill timer for hung processes A sigkill signal is sent to fileserver processes when a timeout is exceeded for shutting down processes for the fs/dafs bnode. (Currently 30 minutes for the fileserver, 1 minute for the other server processes.) If the bnode goal is set to run before this timeout expires, the timer is incorrectly stopped, and a wedged process is never killed. Fix this by not canceling the timer when a fs/dafs process has been signaled to shutdown, regardless of the current goal. Change-Id: I2eca8bcb4bac690f3ef671ca4cf375164ff34d5e Reviewed-on: http://gerrit.openafs.org/7920 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/bozo/fsbnodeops.c b/src/bozo/fsbnodeops.c index 8e0717a37..e93a6d732 100644 --- a/src/bozo/fsbnodeops.c +++ b/src/bozo/fsbnodeops.c @@ -771,7 +771,12 @@ SetNeedsClock(struct fsbnode *ab) { afs_int32 timeout = POLLTIME; - if (ab->b.goal == 1 && ab->fileRunning && ab->volRunning + if ((ab->fileSDW && !ab->fileKillSent) || (ab->volSDW && !ab->volKillSent) + || (ab->scanSDW && !ab->scanKillSent) || (ab->salSDW && !ab->salKillSent) + || (ab->salsrvSDW && !ab->salsrvKillSent)) { + /* SIGQUIT sent, will send SIGKILL if process does not exit */ + ab->needsClock = 1; + } else if (ab->b.goal == 1 && ab->fileRunning && ab->volRunning && (!ab->scancmd || ab->scanRunning) && (!ab->salsrvcmd || ab->salsrvRunning)) { if (ab->b.errorStopCount) {