After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761121 - Applications are not always run under the session systemd unit but under dbus!
Applications are not always run under the session systemd unit but under dbus!
Status: RESOLVED WONTFIX
Product: gnome-session
Classification: Core
Component: gnome-session
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-26 08:30 UTC by victor.noel
Modified: 2016-09-13 21:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description victor.noel 2016-01-26 08:30:44 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
Comment 1 Michael Catanzaro 2016-09-13 21:54:56 UTC
(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.