GNOME Bugzilla – Bug 761121
Applications are not always run under the session systemd unit but under dbus!
Last modified: 2016-09-13 21:54:56 UTC
Hi, With other people using Archlinux, we noticed a strange situation in Gnome that may be a bug while investigating a problem with systemd. Basically, when I look at the systemd unit running for my user by executing "systemctl status user-1000.slice", I see that some of the applications I run with Gnome (using the normal launcher where you type the name of the application and hit enter) are listed under session-c2.scope (itself under user-1000.slice) while other applications (launched in the same way) are listed under dbus.service (itself under user@1000.service, which is under user-1000.slice). The problem with this is that since linux 4.3 cgroups are used in systemd to limit the number of threads available to a given unit: the rationale being that while the user session has a big number of threads (currently 4096 but it is currently upped to 12288, see https://github.com/systemd/systemd/issues/2388), the user service units that run specific services can potentially be limited to a small number of threads. dbus.service being one of those, then many applications run from the gnome launcher are all being put in the same group of thread-limited applications. We noticed it because, currently, systemd had a very low setting for the default number of thread (512) per user service unit, which made many applications crash when executed from gnome-terminal for example. You can see our discussion on the matter and our uncovering of the Gnome potential problem here: https://bugs.archlinux.org/task/47787 Systemd folks decided to remove this limitation (see https://github.com/systemd/systemd/pull/1987), but conceptually speaking, one could desire to limit the user service unit to a small number of thread while keeping the user-1000.slice limitation at a higher number (it is done with a system configuration in logind.conf). Shouldn't all the application run in gnome fall directly under the group pertaining to the user session (session-c2.scope in my case) and not the dbus service? Thanks
(In reply to victor.noel from comment #0) > Shouldn't all the application run in gnome fall directly under the group > pertaining to the user session (session-c2.scope in my case) and not the > dbus service? Not unless gnome-session were to start the D-Bus session bus. That's probably not going to happen? We do call dbus-update-activation-environment, which is all that can be expected here I think.