Re: [systemd-devel] service stop taking too long

2016-05-20 Thread Pradeepa Kumar
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" 
wrote:

> On Wed, 18.05.16 20:38, Pradeepa Kumar (cdprade...@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
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-20 Thread Lennart Poettering
On Wed, 18.05.16 20:38, Pradeepa Kumar (cdprade...@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
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Pradeepa Kumar
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.




On Wed, May 18, 2016 at 8:23 PM, Reindl Harald 
wrote:

>
>
> Am 18.05.2016 um 16:51 schrieb Pradeepa Kumar:
>
>> My understanding is ExecStop will be called before sending SIGTERM to
>> service.
>> if it is true then systemd took 42 sec to initiate stop sequence
>> (calling script in ExecStop) and send SIGTERM to service.
>> please correct me if I am wrong
>>
>
> you don't get it
> your "ExecStop" took 42 sec
>
> On Wed, May 18, 2016 at 7:58 PM, Reindl Harald > > wrote:
>>
>> Am 18.05.2016 um 16:23 schrieb Pradeepa Kumar:
>>
>> I have a script in ExecStop in service file.
>> In journalctl, The time difference between "Stopping XYZ service
>> " and
>> logs from my script in ExecStop is 42 sec.
>> Does that mean systemd itself took long time to start stopping of
>> service?
>>
>>
>> no, it means systemd is only the messenger and your script took 42
>> seconds to finish
>>
>> On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering
>> 
>> >>
>> wrote:
>>
>> On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com
>> 
>> >)
>> wrote:
>>
>> > Hi experts,
>> > I am using systemd v219.
>> > I need help with a systemd issue that I am seeing.
>> > I see that some times stopping of service is taking long
>> time (42 sec).
>> > i checked this in journal logs also.
>> >  is this is known issue ?
>> > how do i debug this ?
>> >  and any solutions ?
>>
>> Well, that depends on the specific service. If a specific
>> service
>> takes 42s to shut down, then try figuring out what it does.
>> If there's
>> nothing in the journal, then maybe the service maintains its
>> own logs?
>> If it does not, see if you can turn on debug logging for it.
>>
>> Either way, that's really a question to ask the maintainers
>> of that
>> service, not to systemd upstream.
>>
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Reindl Harald



Am 18.05.2016 um 16:51 schrieb Pradeepa Kumar:

My understanding is ExecStop will be called before sending SIGTERM to
service.
if it is true then systemd took 42 sec to initiate stop sequence
(calling script in ExecStop) and send SIGTERM to service.
please correct me if I am wrong


you don't get it
your "ExecStop" took 42 sec


On Wed, May 18, 2016 at 7:58 PM, Reindl Harald > wrote:

Am 18.05.2016 um 16:23 schrieb Pradeepa Kumar:

I have a script in ExecStop in service file.
In journalctl, The time difference between "Stopping XYZ service
" and
logs from my script in ExecStop is 42 sec.
Does that mean systemd itself took long time to start stopping of
service?


no, it means systemd is only the messenger and your script took 42
seconds to finish

On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering

>>
wrote:

On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com

>)
wrote:

> Hi experts,
> I am using systemd v219.
> I need help with a systemd issue that I am seeing.
> I see that some times stopping of service is taking long
time (42 sec).
> i checked this in journal logs also.
>  is this is known issue ?
> how do i debug this ?
>  and any solutions ?

Well, that depends on the specific service. If a specific
service
takes 42s to shut down, then try figuring out what it does.
If there's
nothing in the journal, then maybe the service maintains its
own logs?
If it does not, see if you can turn on debug logging for it.

Either way, that's really a question to ask the maintainers
of that
service, not to systemd upstream.




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Pradeepa Kumar
My understanding is ExecStop will be called before sending SIGTERM to
service.
if it is true then systemd took 42 sec to initiate stop sequence (calling
script in ExecStop) and send SIGTERM to service.
please correct me if I am wrong

On Wed, May 18, 2016 at 7:58 PM, Reindl Harald 
wrote:

>
>
> Am 18.05.2016 um 16:23 schrieb Pradeepa Kumar:
>
>> I have a script in ExecStop in service file.
>> In journalctl, The time difference between "Stopping XYZ service " and
>> logs from my script in ExecStop is 42 sec.
>> Does that mean systemd itself took long time to start stopping of
>> service?
>>
>
> no, it means systemd is only the messenger and your script took 42 seconds
> to finish
>
> On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering
>> > wrote:
>>
>> On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com
>> ) wrote:
>>
>> > Hi experts,
>> > I am using systemd v219.
>> > I need help with a systemd issue that I am seeing.
>> > I see that some times stopping of service is taking long time (42
>> sec).
>> > i checked this in journal logs also.
>> >  is this is known issue ?
>> > how do i debug this ?
>> >  and any solutions ?
>>
>> Well, that depends on the specific service. If a specific service
>> takes 42s to shut down, then try figuring out what it does. If there's
>> nothing in the journal, then maybe the service maintains its own logs?
>> If it does not, see if you can turn on debug logging for it.
>>
>> Either way, that's really a question to ask the maintainers of that
>> service, not to systemd upstream.
>>
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Reindl Harald



Am 18.05.2016 um 16:23 schrieb Pradeepa Kumar:

I have a script in ExecStop in service file.
In journalctl, The time difference between "Stopping XYZ service " and
logs from my script in ExecStop is 42 sec.
Does that mean systemd itself took long time to start stopping of
service?


no, it means systemd is only the messenger and your script took 42 
seconds to finish



On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering
> wrote:

On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com
) wrote:

> Hi experts,
> I am using systemd v219.
> I need help with a systemd issue that I am seeing.
> I see that some times stopping of service is taking long time (42 sec).
> i checked this in journal logs also.
>  is this is known issue ?
> how do i debug this ?
>  and any solutions ?

Well, that depends on the specific service. If a specific service
takes 42s to shut down, then try figuring out what it does. If there's
nothing in the journal, then maybe the service maintains its own logs?
If it does not, see if you can turn on debug logging for it.

Either way, that's really a question to ask the maintainers of that
service, not to systemd upstream.




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Pradeepa Kumar
Thanks.
I have a script in ExecStop in service file.
In journalctl, The time difference between "Stopping XYZ service " and logs
from my script in ExecStop is 42 sec.
Does that mean systemd itself took long time to start stopping of service .
?

On Wed, May 18, 2016 at 5:36 PM, Lennart Poettering 
wrote:

> On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com) wrote:
>
> > Hi experts,
> > I am using systemd v219.
> > I need help with a systemd issue that I am seeing.
> > I see that some times stopping of service is taking long time (42 sec).
> > i checked this in journal logs also.
> >  is this is known issue ?
> > how do i debug this ?
> >  and any solutions ?
>
> Well, that depends on the specific service. If a specific service
> takes 42s to shut down, then try figuring out what it does. If there's
> nothing in the journal, then maybe the service maintains its own logs?
> If it does not, see if you can turn on debug logging for it.
>
> Either way, that's really a question to ask the maintainers of that
> service, not to systemd upstream.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] service stop taking too long

2016-05-18 Thread Lennart Poettering
On Wed, 18.05.16 16:00, Pradeepa Kumar (cdprade...@gmail.com) wrote:

> Hi experts,
> I am using systemd v219.
> I need help with a systemd issue that I am seeing.
> I see that some times stopping of service is taking long time (42 sec).
> i checked this in journal logs also.
>  is this is known issue ?
> how do i debug this ?
>  and any solutions ?

Well, that depends on the specific service. If a specific service
takes 42s to shut down, then try figuring out what it does. If there's
nothing in the journal, then maybe the service maintains its own logs?
If it does not, see if you can turn on debug logging for it.

Either way, that's really a question to ask the maintainers of that
service, not to systemd upstream.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel