[Samba] systemctl stop winbind (with CTDB) hanging

Martin Schwenke martin at meltin.net
Tue Oct 10 22:15:20 UTC 2023


Hi Rowland,

On Tue, 10 Oct 2023 10:26:55 +0100, Rowland Penny via samba
<samba at lists.samba.org> wrote:

> On Tue, 10 Oct 2023 12:30:38 +1100
> Martin Schwenke via samba <samba at lists.samba.org> wrote:

> > How can it be that systemd knows that the process is gone but is still
> > "deactivating"?  Is there something we need to do to our
> > winbind.system file to avoid this nonsense?  I know I can probably
> > change TimeoutStopSec to < 90s, but that seems like something I
> > shouldn't have to do.  Is there something we need to do in winbindd?  

> I am not an expert on systemd (far from it), but reading the systemd
> service file on my Debian 11 system, it seems that under [Service] it
> is 'Type=notify', if yours is the same, perhaps changing that to
> 'forking' might help.

Thanks for your reply!

The fun here is that winbind.system uses Type=notify, while ctdb.system
uses Type=forking.  They both behave the same way.

Reading as much of the systemd documentation as I have time for,
https://www.man7.org/linux/man-pages/man3/sd_notify.3.html does talk
about a STOPPING=1 notification.  lib/util/become_daemon.c has support
for READY=1 and general STATUS=... notifications, but doesn't do
STOPPING=1.  Even so, a stopping notification isn't useful for systemd
to know the thing is stopped.

However, it shouldn't matter.  In both cases, if there are no processes
left, particularly the main one, then systemd should stop waiting for
random whatever and finish doing the thing I asked it to.

systemd is truly a gift.  Hmmm... I think that if I translate this to
German it comes out as "systemd ist Gift"...  ;-)

peace & happiness,
martin



More information about the samba mailing list