[systemd-devel] FW: systemd stopping daemons

Bonno Bloksma b.bloksma at tio.nl
Fri Aug 15 03:23:35 PDT 2014


Hi,

Quoting a part of a discussion in debian-user that may be of interest to you .

Bonno Bloksma

-----Oorspronkelijk bericht-----
Van: Bonno Bloksma
Verzonden: vrijdag 15 augustus 2014 11:20
Aan: debian-user at lists.debian.org
Onderwerp: RE: systemd fails to poweroff - "A stop job is running for Session 2 of user $USER"

Hi,

> "A stop job is running for Session 2 of user $USER"
[...]
> > I interpret the quoted string in the Subject: header as being flawed 
> > use of English language. 'stop' should be 'stopped'. And, there is a
> 
> That would definitely be clearer.
> 
> I was interpreting it as some special systemd shutdown-ey thing which 
> runs around trying to stop things, and that there might be various of 
> these, and one of them has a problem.

> Yes, I believe this is the correct interpretation. SystemD will tell 
> all services  to "stop".  It will  then wait  until all  those sevices 
> have stopped. Some services will  stop immediately, but  some need  a 
> little longer to  flush logs, finish servicing  a request or whatever.

> After a period of seconds, it appears that SystemD  will pop up a 
> message to the effect  of "I'm  still  here,  still responding.  I'm 
> just waiting  for service X to tell me it has stopped."
> Given what was said earlier in the thread, I  suspect this will  continue
> for  90 seconds until  it finally gives up waiting.

I wonder if the people developing this are paying attention to a development in de Windows environment where the latest thing is that de service can report back that it is indeed still trying to stop and not just hung and not reporting back. Windows will now kill a service after a certain time when shutting down, in some cases it was killing a database that took A LONG TIME to shut down and cause the database to become inconsistent.
If systemd is trying to become smart about stopping services it might be a good idea to have this built in. Also not just have the service report back "I am still busy" but also with a progress indicator which NEEDS to increase at each report so system can detect whether the service is indeed progressing towards a stopped state or hung in the getting there.

Bonno Bloksma



More information about the systemd-devel mailing list