<div dir="ltr">Guys, I just want to give a bit more context that I've found out since then which might be relevant.<div><br></div><div>As you probably know (but to document it here), if you set the variable PIDOF_NETFS or set the flag -n for 'pidof', it will avoid trying to stat files on NFS partitions.  This will solve some of these types of issues-- but not all of them, because a binary that's local can still be in D state due to accessing a stuck partition.  I'd also like to point out (and I don't know if this is really the case but it might be) that maybe a process that's not in a D or Z state might still have a binary on a stuck mount point where calling "stat" on it would fail.  But I don't want to complicate things too much: a partial fix is better than nothing.</div><div><br></div><div>Also, at the current time (and IIRC this wasn't the case when we submitted the original patch), start-stop-daemon is a binary not a script, and it doesn't call pidof or killall.  Instead it uses its own code, and that code is subject to the same issue where it hangs on stuck NFS partitions.  Therefore, as it stands, applying this patch to 'pidof' will no longer resolve the issue; similar changes would have to be made to 'killall'.</div><div><br></div><div>We have a cluster of Linux servers running GridEngine, and they each export volumes via NFS.  We have a problem when one of the NFS servers dies.  The stuck mount point on other nodes causes user processes there to enter the D state (e.g. if they have pending output to the disk that's down).  This makes it impossible to do routine maintenance on the other nodes, so they pretty soon will need a reboot, and very often in this condition those reboots will fail because a shutdown task hangs.  Their unavailable NFS volumes cause failures on other nodes in turn, unless someone is available to physically reboot.  (We're planning to eventually use virtualization to prevent this failure; previously there were complications relating to NVidia GPUs).</div><div><br></div><div>Dan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 31, 2017 at 9:31 AM, Ian Jackson <span dir="ltr"><<a href="mailto:ijackson@chiark.greenend.org.uk" target="_blank">ijackson@chiark.greenend.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Daniel Povey writes ("Bug#719273: Acknowledgement (sysvinit-utils: /bin/pidof fails when there are stuck NFS mount points, preventing shutdown)"):<br>
</span><span class="">> We're going to check it out early next week, whether it still applies.<br>
><br>
> The bug it fixes is a situation where pidof reaches a process that's in a bad<br>
> state such as D or Z, that might have an executable on a stuck mount point or<br>
> something like that, and gets stuck, preventing system maintenance tasks or<br>
> shutdown.<br>
<br>
</span>Yes.  The principle of the patch LGTM.  Hence my tagging the bug<br>
accordingly.<br>
<br>
Thanks for your persistence.<br>
<span class="HOEnZb"><font color="#888888"><br>
Ian.<br>
</font></span></blockquote></div><br></div>