[systemd-devel] service stop taking too long

Pradeepa Kumar cdpradeepa at gmail.com
Fri May 20 15:09:35 UTC 2016


I debugged this further .
And this turned out to be issue with our script in ExecStop.
Thanks for comments
On May 20, 2016 8:16 PM, "Lennart Poettering" <lennart at poettering.net>
wrote:

> On Wed, 18.05.16 20:38, Pradeepa Kumar (cdpradeepa at gmail.com) wrote:
>
> > sorry for not being clear earlier.
> >  may be i am not explaining properly.
> >
> > In XYZ.service:
> > ExecStop: myscript1
> >
> > $cat myscript1
> > echo "inside myscript1"
> >
> >
> > and
> >
> > The sequence in jounrnalctl logs are:
> >
> >  May 18 01:18:06 machine1 systemd[1]: Stopping "XYZ service"...
> > ...
> >  May 18 01:18:46 machine1  myscript1[3941]: inside myscript1
> >
> > As you can see, the beginning of execution of myscript1 took 40 sec.
>
> So you are saying that systemd reports that it is starting your script
> 40 seconds before your script is actually started?
>
> If so, this would suggest that something hangs in the time systemd forks
> off your stop script, but before exec() is actually called for
> it. This could be an NSS look-up done due to User= or Group=, or a PAM
> intraction done via PAM= or so.
>
> How precisely does your full service file look like?
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160520/1f8891d6/attachment.html>


More information about the systemd-devel mailing list