User: Password:
|
|
Subscribe / Log in / New account

Changes coming for systemd and control groups

Changes coming for systemd and control groups

Posted Jun 23, 2013 5:32 UTC (Sun) by ringerc (subscriber, #3071)
In reply to: Changes coming for systemd and control groups by zblaxell
Parent article: Changes coming for systemd and control groups

I'd really like to see specific, technical detail on this, with bug report references, the patches you apply to mitigate the issue as you see it, etc.

From the thread so far it seems you're concerned that a process group gets SIGKILLed by default when the process group leader exits. That's certainly a significant change, but I'm not sure I see scenarios in which it should lead to data loss.

I work a lot with PostgreSQL, and in the case of it or any other properly functioning RDBMS what systemd is doing is actually quite useful. In PostgreSQL if the postmaster crashes out (which it shouldn't, but with memory errors, etc, it may) it needs a way to terminate its child processes in a timely and reliable way before the postmaster can be relaunched.

Having systemd do that automatically would actually be quite handy, to the point where on systemd-based systems I wonder if the postmaster shouldn't attempt to auto-restart its self like it usually does, and should instead exit. That way systemd would clean up its children then relaunch it.


(Log in to post comments)

Changes coming for systemd and control groups

Posted Jun 23, 2013 15:28 UTC (Sun) by Tobu (subscriber, #24111) [Link]

A likely scenario is a shell exiting with background jobs left running; while the shell can shut down cleanly, the background job doesn't have the opportunity. That's probably solvable by changing the defaults for shell-like units, job servers, and session servers, as well as providing a disown-like command to reparent processes that should survive.

Systemd broke nohup?

Posted Jun 23, 2013 18:04 UTC (Sun) by ebiederm (subscriber, #35028) [Link]

Am I reading this comments correctly? Did systemd break nohup?

Systemd broke nohup?

Posted Jun 23, 2013 18:20 UTC (Sun) by Aissen (guest, #59976) [Link]

Systemd broke nohup?

Posted Jun 23, 2013 18:40 UTC (Sun) by Tobu (subscriber, #24111) [Link]

Oops, sorry I forgot pam/logind. Apparently most distros set it to screen/disown/nohup-friendly, and further tweaking can be done in pam.d and logind.conf.

Systemd broke nohup?

Posted Jul 2, 2013 20:55 UTC (Tue) by zblaxell (subscriber, #26385) [Link]

This is one of those non-working workarounds I was alluding to. None of the PAM recipes I've seen works properly. Some of them mask the problem, but then fail under difficult-to-reproduce circumstances.

Maybe in a few years when all the distros get it working, it could be useful, but for now it's just a support nightmare.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds