"not a snap cgroup" after updates

I just ran some updates this morning and now telegram-desktop snap will not run. I’ve also tried reinstalling. Cherrytree snap does work just fine.

This is the error I get: /user.slice/user-1000.slice/session-2.scope is not a snap cgroup

Any suggestions?

Please post the output of:

  • snap version
  • SNAPD_DEBUG=1 snap run telegram-desktop
  • sudo journalctl --no-pager

snap version

snap    2.54.3.2
snapd   2.54.3.2
series  16
debian  -
kernel  5.16.0-1-amd64

SNAPD_DEBUG=1 snap run telegram-desktop

2022/03/04 04:54:58.613483 tool_linux.go:204: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2022/03/04 04:54:58.645861 cmd_run.go:1026: DEBUG: executing snap-confine from /snap/core/12725/usr/lib/snapd/snap-confine
2022/03/04 04:54:58.646967 cmd_run.go:433: DEBUG: SELinux not enabled
2022/03/04 04:54:58.647627 tracking.go:46: DEBUG: creating transient scope snap.telegram-desktop.telegram-desktop
2022/03/04 04:54:58.648685 tracking.go:186: DEBUG: using session bus
2022/03/04 04:54:58.651961 tracking.go:294: DEBUG: StartTransientUnit failed with "org.freedesktop.DBus.Error.Spawn.ChildExited": [Process org.freedesktop.systemd1 exited with status 1]
2022/03/04 04:54:58.652220 cmd_run.go:1198: DEBUG: snapd cannot track the started application
2022/03/04 04:54:58.652234 cmd_run.go:1199: DEBUG: snap refreshes will not be postponed by this process
DEBUG: umask reset, old umask was  022
DEBUG: security tag: snap.telegram-desktop.telegram-desktop
DEBUG: executable:   /usr/lib/snapd/snap-exec
DEBUG: confinement:  non-classic
DEBUG: base snap:    core20
DEBUG: ruid: 1000, euid: 0, suid: 0
DEBUG: rgid: 1000, egid: 1000, sgid: 1000
DEBUG: apparmor label on snap-confine is: /snap/core/12725/usr/lib/snapd/snap-confine
DEBUG: apparmor mode is: enforce
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: opening lock file: /run/snapd/lock/.lock
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope (global), uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: ensuring that snap mount directory is shared
DEBUG: unsharing snap namespace directory
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: releasing lock 5
DEBUG: opened snap-update-ns executable as file descriptor 5
DEBUG: opened snap-discard-ns executable as file descriptor 6
DEBUG: creating lock directory /run/snapd/lock (if missing)
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: opening lock directory /run/snapd/lock
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: opening lock file: /run/snapd/lock/telegram-desktop.lock
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: acquiring exclusive lock (scope telegram-desktop, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: telegram-desktop
DEBUG: setting up device cgroup
DEBUG: libudev has current tags support
DEBUG: device /sys/devices/pci0000:00/0000:00:03.1/0000:29:00.0/drm/card0 has matching current tag
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: get bpf object at path /sys/fs/bpf/snap/snap_telegram-desktop_telegram-desktop
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: found existing device map
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: get next key for map 8
DEBUG: found 23 existing entries in devices map
DEBUG: delete key for c 195:0
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:3
DEBUG: delete elem in map 8
DEBUG: delete key for c 5:1
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:7
DEBUG: delete elem in map 8
DEBUG: delete key for c 10:200
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:9
DEBUG: delete elem in map 8
DEBUG: delete key for c 195:254
DEBUG: delete elem in map 8
DEBUG: delete key for c 5:0
DEBUG: delete elem in map 8
DEBUG: delete key for c 139:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 136:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:8
DEBUG: delete elem in map 8
DEBUG: delete key for c 138:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:5
DEBUG: delete elem in map 8
DEBUG: delete key for c 10:239
DEBUG: delete elem in map 8
DEBUG: delete key for c 141:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 226:128
DEBUG: delete elem in map 8
DEBUG: delete key for c 140:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 143:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 5:2
DEBUG: delete elem in map 8
DEBUG: delete key for c 137:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 195:255
DEBUG: delete elem in map 8
DEBUG: delete key for c 226:0
DEBUG: delete elem in map 8
DEBUG: delete key for c 142:-1
DEBUG: delete elem in map 8
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: load program of type 0xf, 33 instructions
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: v2 allow c 1:3
DEBUG: v2 allow c 1:5
DEBUG: v2 allow c 1:7
DEBUG: v2 allow c 1:8
DEBUG: v2 allow c 1:9
DEBUG: v2 allow c 5:0
DEBUG: v2 allow c 5:1
DEBUG: v2 allow c 5:2
DEBUG: v2 allow c 136:4294967295
DEBUG: v2 allow c 137:4294967295
DEBUG: v2 allow c 138:4294967295
DEBUG: v2 allow c 139:4294967295
DEBUG: v2 allow c 140:4294967295
DEBUG: v2 allow c 141:4294967295
DEBUG: v2 allow c 142:4294967295
DEBUG: v2 allow c 143:4294967295
DEBUG: v2 allow c 195:0
DEBUG: v2 allow c 195:255
DEBUG: v2 allow c 195:254
DEBUG: v2 allow c 10:239
DEBUG: v2 allow c 10:200
DEBUG: inspecting type of device: /dev/dri/card0
DEBUG: v2 allow c 226:0
DEBUG: device /sys/devices/pci0000:00/0000:00:03.1/0000:29:00.0/drm/renderD128 has matching current tag
DEBUG: inspecting type of device: /dev/dri/renderD128
DEBUG: v2 allow c 226:128
DEBUG: process in cgroup /user.slice/user-1000.slice/session-2.scope
/user.slice/user-1000.slice/session-2.scope is not a snap cgroup

sudo journalctl --no-pager

Mar 04 04:59:20 mypc dbus-daemon[1374]: [session uid=1000 pid=1372] Activating service name='org.freedesktop.systemd1' requested by ':1.552' (uid=1000 pid=64215 comm="snap run telegram-desktop ")
Mar 04 04:59:20 mypc dbus-daemon[1374]: [session uid=1000 pid=1372] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Mar 04 04:59:20 mypc audit[64215]: AVC apparmor="DENIED" operation="capable" profile="/snap/core/12725/usr/lib/snapd/snap-confine" pid=64215 comm="snap-confine" capability=12  capname="net_admin"
Mar 04 04:59:20 mypc audit[64215]: AVC apparmor="DENIED" operation="capable" profile="/snap/core/12725/usr/lib/snapd/snap-confine" pid=64215 comm="snap-confine" capability=38  capname="perfmon"
Mar 04 04:59:20 mypc kernel: audit: type=1400 audit(1646391560.193:55): apparmor="DENIED" operation="capable" profile="/snap/core/12725/usr/lib/snapd/snap-confine" pid=64215 comm="snap-confine" capability=12  capname="net_admin"
Mar 04 04:59:20 mypc kernel: audit: type=1400 audit(1646391560.193:56): apparmor="DENIED" operation="capable" profile="/snap/core/12725/usr/lib/snapd/snap-confine" pid=64215 comm="snap-confine" capability=38  capname="perfmon"

This appears to be the root of the problem. I cannot tell why it failed on your particular installation, but if your system is using cgroup v2, then we require that snap application is placed in a separate scope in order to be able to provide device access filtering. So the real question is why this failure occurs:

Mar 04 04:59:20 mypc dbus-daemon[1374]: [session uid=1000 pid=1372] 
   Activated service 'org.freedesktop.systemd1' failed: 
     Process org.freedesktop.systemd1 exited with status 1

How would I go about investigating that?

I need access to the program and I can’t run it. I even tried sudo as a temporary workaround and that failed.

what distro is this actually ? it seems to think it is debian but does not actually agree with itself …

showing a dash instead of the actual debian release kind of indicates that something was hacked together instead of being a proper derivative …

It’s vanilla debian, but it’s been upgraded a few times and I’m running xfce, but I think I used to have gnome or something else as my gui.

uname -a

Linux mypc 5.16.0-1-amd64 #1 SMP PREEMPT Debian 5.16.7-2 (2022-02-09) x86_64 GNU/Linux

cat /proc/sys

Linux version 5.16.0-1-amd64 (debian-kernel@lists.debian.org) (gcc-11 (Debian 11.2.0-16) 11.2.0, GNU ld (GNU Binutils for Debian) 2.37.90.20220130) #1 SMP PREEMPT Debian 5.16.7-2 (2022-02-09)

FWIW I suggest to install gdm, set it up as your display manager and see if that works. I’m not sure lddm/sddm/other-randm-dm sets up your session correctly.

Nevermind. I am just going to find a way to not need snap for this. I’m sure they have other install methods. I never had a whole lot of luck with snap in the past and that trend seems to be continuing.