Slow shutdown in dependency-based boot system

Sven Joachim svenjoac at gmx.de
Tue Jul 15 18:57:02 UTC 2008


On 2008-07-15 17:27 +0200, Erich Schubert wrote:

> Hi,
>> It is indeed nfs-common, if I call "/etc/init.d/nfs-common stop" before
>> the shutdown, sendsigs only takes one second again.  So why does it take
>> so long for sendsigs to kill rpc.{stat,idmap}.d?
>
> Just a wild (completely uninformed) guess:
> rpc.* register with portmap, so they probably also try to unregister with it.
> What if portmap gets killed before the rpc.* processes, will they upon
> -TERM try to unregister first and thus run into a timeout?
> You could try putting portmap on the don't kill list and see if that
> helps anything?

Thank you very much, I think this brought me on the right track.
Actually portmap is supposed to be on the don't kill list:

,----
| $ ls -l /lib/init/rw/sendsigs.omit.d/
| total 0
| lrwxrwxrwx 1 root root 20 Jul 15 19:38 portmap -> /var/run/portmap.pid
`----

However this doesn't work, because /var/run/portmap.pid does not exist:

,----
| $ file /lib/init/rw/sendsigs.omit.d/portmap
| /lib/init/rw/sendsigs.omit.d/portmap: broken symbolic link to `/var/run/portmap.pid'
`----

The portmap init script is broken, it uses `pidof portmap` as the pid to
check instead of using start-stop-daemon's --pidfile option.  I'll file
a bugreport on that.

Thanks,
       Sven



More information about the initscripts-ng-devel mailing list