Failed to add PIDs to scope's control group

Bug #1742804 reported by Peter Eszlari
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
systemd
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Confirmed
Undecided
Unassigned

Bug Description

[impact]

systemd-run --user --scope fails

[test case]

$ systemd-run --user --scope echo hello
Job for run-r150c7437bf8a4c5e919acbbc3de0b29c.scope failed.
See "systemctl status run-r150c7437bf8a4c5e919acbbc3de0b29c.scope" and "journalctl -xe" for details.

[regression potential]

large. this is fixed upstream by a large sequence of patches, and would need careful attention applying them all to make sure no regressions were introduced.

If I, or anyone else, attempts this backport, they definitely need to add more detail to this section.

[scope]

This is fixed upstream by this large PR:
https://github.com/systemd/systemd/pull/8125

That's included starting in systemd v238, so just missed the Bionic version. This is fixed already in all releases after Bionic, and needed only for Bionic.

[original description]

When I launch applications with flatpak, "journalctl -f" shows the following:

Jan 11 22:44:13 localhost systemd[1244]: flatpak-org.kde.krita-8134.scope: Failed to add PIDs to scope's control group: Permission denied
Jan 11 22:44:13 localhost systemd[1244]: Failed to start flatpak-org.kde.krita-8134.scope.
Jan 11 22:44:13 localhost systemd[1244]: flatpak-org.kde.krita-8134.scope: Unit entered failed state.

I explicitly mentioned "Kubuntu" in the summary, because I experience this only under Kubuntu (17.10 and 18.04), NOT under the regular Gnome-based Ubuntu Desktop (17.10). At first this error message seemed harmless, because it looked like it had no effect. But now I noticed that with certain flatpak apps, the file open dialog would not pop up. And I too experienced this only under Kubuntu, not Ubuntu or Fedora (all tested). So there might be a connection.

I first reported this to flatpak:

https://github.com/flatpak/flatpak/issues/1216

There it was suggested to try the following command:

$ systemd-run --user --scope echo hello
Job for run-r150c7437bf8a4c5e919acbbc3de0b29c.scope failed.
See "systemctl status run-r150c7437bf8a4c5e919acbbc3de0b29c.scope" and "journalctl -xe" for details.

...and this one also fails.

Revision history for this message
Peter Eszlari (eszlari) wrote :

I tested it again with the regular Gnome-based Ubuntu desktop, and it exhibits the same bug, so i changed the title accordingly. It seems there is no connection to the flatpak problem.

summary: - Kubuntu: Failed to add PIDs to scope's control group
+ Failed to add PIDs to scope's control group
Revision history for this message
Peter Eszlari (eszlari) wrote :

This is fixed in now.

Changed in systemd (Ubuntu):
status: New → Fix Released
Revision history for this message
Dan Streetman (ddstreet) wrote :

Hi, sorry this was reported before I subscribed to systemd bugs.

This does still affect Bionic, so I targeted the bug for that release; this should be fixed already in all releases after Bionic.

Changed in systemd (Ubuntu Bionic):
status: New → Confirmed
Dan Streetman (ddstreet)
description: updated
Changed in systemd:
status: Unknown → Fix Released
Revision history for this message
rekcuFniarB (retratserif) wrote :

> status: Unknown → Fix Released

Still affects me too. I don't see fix released for Bionic.

Revision history for this message
Dan Streetman (ddstreet) wrote :

> > status: Unknown → Fix Released
>
> Still affects me too. I don't see fix released for Bionic.

that refers to the status in upstream systemd, not Bionic.

As I noted in the bug description, this requires a quite large patchset to fix in Bionic; I'm not sure when/if that might get backported.

Revision history for this message
Laurent Simon (stratic) wrote :

I get it too, but on a fresh Kubuntu 20.10!

$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy

$ systemd-run --user --scope echo hello
systemd-run --user --scope echo hello

$ journalctl -e
janv. 04 14:33:01 7710-eezIT systemd[1525]: run-r455914ea041e4490a546761646fda345.scope: Failed to add PIDs to scope's control group: Permission denied
janv. 04 14:33:01 7710-eezIT systemd[1525]: run-r455914ea041e4490a546761646fda345.scope: Failed with result 'resources'.
janv. 04 14:33:01 7710-eezIT systemd[1525]: Failed to start /usr/bin/echo hello.

The logs are fulfilled of this kind of messages.

Revision history for this message
Dan Streetman (ddstreet) wrote :

> I get it too, but on a fresh Kubuntu 20.10!

I just tested on groovy and see no failure.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.