samba: nmbd stopping fails once?
drifter at bcsoft.de
Mon Jul 23 04:42:12 PDT 2007
Dan Nicholson wrote:
> On 7/20/07, Jens Stroebel <drifter at bcsoft.de> wrote:
> Hmm, it's hard for me to see what's going on because I only ever get
> one nmbd process. But when I kill the parent smbd process, the
> children all die. What happens when you just kill the parent (26943)
> directly? Do any nmbd processes remain?
Nope; I'd say that
- killproc erronomeously kills the child first
- parent respawns a child
- parent gets killed, child remains
- killproc finds child -> failure
Checking by killing the child by hand seems to confirm this, as a child
gets started when I kill the existing child wheras all nmbd processes
are gone if I kill only the parent.
!! When the child was killed, the parent seems to stop reacting on
SIGTERM, needing KILL to be really killed; doing so leaves the child
that got started, which matches with what can be seen using the
un-altered sambe init script with "stop" !!
> Out of curiosity, what version of the lfs-bootscripts are you using?
> I've been fixing bugs in the functions over the past few months. I
> changed killproc to be more consistent, but I don't know if that would
> change anything here.
I'm tracking LFS development quite closely, so I use
LFS-Bootscripts-20070420 as in the current development book. I thought
this to be the actual version, but as you say you've made changes over
the last months, maybe you didn't roll a new release yet?
> And this is what causes it to fail. The script is assuming that it
> shouldn't find any more pids after the killing process. You may be
> able to "solve" the problem just by telling killproc to use the
> pidfile. This is more correct anyway, since you want to kill the
> parent daemon. Try changing the bootscript to this:
> killproc -p /var/run/nmbd.pid /usr/sbin/nmbd
I'll do that. [waiting time ...] Yes, this works fine :).
Getting the pid from the nmbd.pid file, the killproc call kills the
parent, which terminates its child, too.
> This would have the nice side effect that the child daemon (26944) is
> not killed by kill, but rather the parent daemon (26943). I'd be
> curious to know if the extra spawned daemon (27127) happens in this
No extra daemon with using the nmbd.pid file.
Thanks for your help, once again.
drifter at bcsoft.de
By caffeine alone I set my mind in motion, By the beans of Java
do thoughts acquire speed, hands acquire shaking, the shaking
becomes a warning, By caffeine alone do I set my mind in motion
More information about the blfs-dev