AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 696600
Accepted
Ashfaqur Rahaman
Ashfaqur Rahaman
Asked: 2022-03-24 17:04:22 +0800 CST2022-03-24 17:04:22 +0800 CST 2022-03-24 17:04:22 +0800 CST

snap 包失败:/user.slice/user-1000.slice/session-1.scope 不是 snap cgroup

  • 772

突然,快照包无法在我的系统中运行,并出现以下错误:

/user.slice/user-1000.slice/session-1.scope 不是 snap cgroup

操作系统:Debian 11

内核:5.10.0-12-amd64

$ SNAPD_DEBUG=1 snap run slack

2022/03/23 18:48:37.614818 tool_linux.go:204: DEBUG: restarting into "/snap/snapd/current/usr/bin/snap"
2022/03/23 18:48:37.625495 cmd_run.go:1026: DEBUG: executing snap-confine from /snap/snapd/15177/usr/lib/snapd/snap-confine
2022/03/23 18:48:37.625874 cmd_run.go:433: DEBUG: SELinux not enabled
2022/03/23 18:48:37.626049 tracking.go:46: DEBUG: creating transient scope snap.slack.slack
2022/03/23 18:48:37.626597 tracking.go:186: DEBUG: using session bus
2022/03/23 18:48:37.627860 tracking.go:294: DEBUG: StartTransientUnit failed with "org.freedesktop.DBus.Error.Spawn.ChildExited": [Process org.freedesktop.systemd1 exited with status 1]
2022/03/23 18:48:37.627986 cmd_run.go:1198: DEBUG: snapd cannot track the started application
2022/03/23 18:48:37.627996 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.slack.slack
DEBUG: executable:   /usr/lib/snapd/snap-exec
DEBUG: confinement:  non-classic
DEBUG: base snap:    core18
DEBUG: ruid: 1000, euid: 0, suid: 0
DEBUG: rgid: 1000, egid: 1000, sgid: 1000
DEBUG: apparmor label on snap-confine is: /snap/snapd/15177/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/slack.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 slack, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: slack
DEBUG: setting up device cgroup
DEBUG: libudev has current tags support
DEBUG: device /sys/devices/pci0000:00/0000:00:02.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_slack_slack
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: found 20 existing entries in devices map
DEBUG: delete key for c 143:-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 10:239
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:7
DEBUG: delete elem in map 8
DEBUG: delete key for c 138:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 142:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 137:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 141:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 5:0
DEBUG: delete elem in map 8
DEBUG: delete key for c 226:0
DEBUG: delete elem in map 8
DEBUG: delete key for c 140:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:9
DEBUG: delete elem in map 8
DEBUG: delete key for c 139:-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 1:5
DEBUG: delete elem in map 8
DEBUG: delete key for c 1:3
DEBUG: delete elem in map 8
DEBUG: delete key for c 226:128
DEBUG: delete elem in map 8
DEBUG: delete key for c 136:-1
DEBUG: delete elem in map 8
DEBUG: delete key for c 5:1
DEBUG: delete elem in map 8
DEBUG: delete key for c 10:200
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 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:02.0/drm/card0/card0-DP-1 has matching current tag
DEBUG: cannot get major/minor numbers for syspath /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
DEBUG: device /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1 has matching current tag
DEBUG: cannot get major/minor numbers for syspath /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1
DEBUG: device /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2 has matching current tag
DEBUG: cannot get major/minor numbers for syspath /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-2
DEBUG: device /sys/devices/pci0000:00/0000:00:02.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-1.scope
/user.slice/user-1000.slice/session-1.scope is not a snap cgroup

从 snapd 日志中,我认为根本问题是:

2022/03/23 18:48:37.627860 tracking.go:294:调试:StartTransientUnit 因“org.freedesktop.DBus.Error.Spawn.ChildExited”失败:[进程 org.freedesktop.systemd1 以状态 1 退出]

我可以采取哪些步骤来解决此问题?一些附加信息:

$ snap --version

snap    2.54.4
snapd   2.54.4
series  16
debian  11
kernel  5.10.0-12-amd64

$ systemctl --version

systemd 247 (247.3-6)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified

$ sudo systemct status dbus.service

 dbus.service - D-Bus System Message Bus
     Loaded: loaded (/lib/systemd/system/dbus.service; static)
     Active: active (running) since Wed 2022-03-23 18:17:36 MDT; 34min ago
TriggeredBy: ● dbus.socket
       Docs: man:dbus-daemon(1)
   Main PID: 551 (dbus-daemon)
      Tasks: 1 (limit: 18764)
     Memory: 2.3M
        CPU: 1.785s
     CGroup: /system.slice/dbus.service
             └─551 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Mar 23 18:17:36 sboban-desktop systemd[1]: Started D-Bus System Message Bus.
Mar 23 18:17:37 sboban-desktop dbus-daemon[551]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.11' >
Mar 23 18:17:37 sboban-desktop dbus-daemon[551]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 23 18:17:44 sboban-desktop dbus-daemon[551]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.16' (uid=1000 pid=8>
Mar 23 18:17:44 sboban-desktop dbus-daemon[551]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
Mar 23 18:18:10 sboban-desktop dbus-daemon[551]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service' requested by ':1.11' >
Mar 23 18:18:10 sboban-desktop dbus-daemon[551]: [system] Successfully activated service 'org.freedesktop.timedate1'
Mar 23 18:18:18 sboban-desktop dbus-daemon[551]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service' requested by ':1.36' (uid=1000 pid=1192 comm="/u>
Mar 23 18:18:18 sboban-desktop dbus-daemon[551]: [system] Successfully activated service 'org.freedesktop.UPower'

$ systemctl --user dbus.service

dbus.service - D-Bus User Message Bus
     Loaded: loaded (/usr/lib/systemd/user/dbus.service; static)
     Active: active (running) since Wed 2022-03-23 18:17:44 MDT; 36min ago
TriggeredBy: ● dbus.socket
       Docs: man:dbus-daemon(1)
   Main PID: 877 (dbus-daemon)
      Tasks: 1 (limit: 18764)
     Memory: 1.1M
        CPU: 5ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/dbus.service
             └─877 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

Mar 23 18:17:44 sboban-desktop systemd[846]: Started D-Bus User Message Bus.

$ sudo systemctl status user@$(id -u)

 [email protected] - User Manager for UID 1000
     Loaded: loaded (/lib/systemd/system/[email protected]; static)
     Active: active (running) since Wed 2022-03-23 18:17:44 MDT; 37min ago
       Docs: man:[email protected](5)
   Main PID: 846 (systemd)
     Status: "Startup finished in 774ms."
      Tasks: 9
     Memory: 41.1M
        CPU: 484ms
     CGroup: /user.slice/user-1000.slice/[email protected]
             ├─app.slice
             │ ├─dbus.service
             │ │ └─877 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
             │ ├─pipewire.service
             │ │ ├─866 /usr/bin/pipewire
             │ │ └─878 /usr/bin/pipewire-media-session
             │ └─pulseaudio.service
             │   └─867 /usr/bin/pulseaudio --daemonize=no --log-target=journal
             └─init.scope
               ├─846 /lib/systemd/systemd --user
               └─847 (sd-pam)

Mar 23 18:17:44 sboban-desktop systemd[846]: Reached target Sockets.
Mar 23 18:17:44 sboban-desktop systemd[846]: Reached target Basic System.
Mar 23 18:17:44 sboban-desktop systemd[1]: Started User Manager for UID 1000.
Mar 23 18:17:44 sboban-desktop systemd[846]: Started Multimedia Service.
Mar 23 18:17:44 sboban-desktop systemd[846]: Starting Sound Service...
Mar 23 18:17:44 sboban-desktop systemd[846]: Started D-Bus User Message Bus.
Mar 23 18:17:44 sboban-desktop pipewire[866]: Failed to receive portal pid: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get PID of name 'org.freedesktop.portal.Desktop': no such name
Mar 23 18:17:45 sboban-desktop systemd[846]: Started Sound Service.
Mar 23 18:17:45 sboban-desktop systemd[846]: Reached target Main User Target.
Mar 23 18:17:45 sboban-desktop systemd[846]: Startup finished in 774ms.

如果您需要更多信息,请告诉我。任何形式的帮助将不胜感激。谢谢你。

systemd snap
  • 1 1 个回答
  • 2784 Views

1 个回答

  • Voted
  1. Best Answer
    Ashfaqur Rahaman
    2022-04-19T13:36:06+08:002022-04-19T13:36:06+08:00

    构建和安装更新的内核解决了这个问题。就我而言,它v5.18-rc1-390-gf45ba67eb74a来自net-next分支。其他较新的内核也可能工作。

    • 1

相关问题

  • journalctl 中的区分级别

  • 将默认编辑器更改为 vim for _ sudo systemctl edit [unit-file] _

  • systemd:如何在服务启动时运行脚本,而不编辑服务定义

  • 使用 systemd 看门狗支持重新启动应用程序

  • 使用键盘快捷键启动/停止 systemd 服务 [关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve