多个 snap 应用程序在启动时崩溃

多个 snap 应用程序在启动时崩溃

KeepassXC 和 Chromium-browser 等多个应用程序在启动时崩溃。在我看来,Snap 中似乎存在错误。我在使用 Firefox 时也遇到了同样的问题,我将其从 Snap 控制中取出并用 deb 包替换后,问题就解决了。

KeepassXC 崩溃的原因:

$ keepassxc
unexpected fault address 0x6de210
fatal error: fault
[signal SIGBUS: bus error code=0x2 addr=0x6de210 pc=0x6de210]

goroutine 1 [running, locked to thread]:
runtime.throw(0x7bb445, 0x5)
    /usr/lib/go-1.13/src/runtime/panic.go:774 +0x72 fp=0xc00012be68 sp=0xc00012be38 pc=0x42d932
runtime.sigpanic()
    /usr/lib/go-1.13/src/runtime/signal_unix.go:391 +0x455 fp=0xc00012be98 sp=0xc00012be68 pc=0x441cc5
github.com/godbus/dbus.init()
    /build/snapd/parts/snapd-deb/build/vendor/github.com/godbus/dbus/call.go:8 fp=0xc00012bea0 sp=0xc00012be98 pc=0x6de210
runtime.doInit(0xa406e0)
    /usr/lib/go-1.13/src/runtime/proc.go:5222 +0x8a fp=0xc00012bed0 sp=0xc00012bea0 pc=0x43b34a
runtime.doInit(0xa3e800)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00012bf00 sp=0xc00012bed0 pc=0x43b317
runtime.doInit(0xa41720)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00012bf30 sp=0xc00012bf00 pc=0x43b317
runtime.doInit(0xa3ea80)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00012bf60 sp=0xc00012bf30 pc=0x43b317
runtime.main()
    /usr/lib/go-1.13/src/runtime/proc.go:190 +0x1da fp=0xc00012bfe0 sp=0xc00012bf60 pc=0x42f28a
runtime.goexit()
    /usr/lib/go-1.13/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc00012bfe8 sp=0xc00012bfe0 pc=0x459771

我尝试重新安装 Chromium 浏览器后,它仍然无法安装:

$ sudo apt install chromium-browser
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  chromium-browser
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 48,9 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu lunar/universe amd64 chromium-browser amd64 1:85.0.4183.83-0ubuntu3 [48,9 kB]
Fetched 48,9 kB in 0s (174 kB/s)        
Preconfiguring packages ...
(Reading database ... 308202 files and directories currently installed.)
Preparing to unpack .../chromium-browser_1%3a85.0.4183.83-0ubuntu3_amd64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
==> Installing the chromium snap
error: cannot perform the following tasks:
- Run configure hook of "chromium" snap if present (run hook "configure": 
-----
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot o
pen directory "/var/lib/snapd": permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot ope
n directory "/var/lib/snapd": permission denied
unexpected fault address 0x6de210
fatal error: fault
[signal SIGBUS: bus error code=0x2 addr=0x6de210 pc=0x6de210]

goroutine 1 [running, locked to thread]:
runtime.throw(0x7bb445, 0x5)
    /usr/lib/go-1.13/src/runtime/panic.go:774 +0x72 fp=0xc00010de68 sp=0xc00010de38 pc=0x42d932
runtime.sigpanic()
    /usr/lib/go-1.13/src/runtime/signal_unix.go:391 +0x455 fp=0xc00010de98 sp=0xc00010de68 pc=0x441cc5
github.com/godbus/dbus.init()
    /build/snapd/parts/snapd-deb/build/vendor/github.com/godbus/dbus/call.go:8 fp=0xc00010dea0 sp=0xc00010de98 pc=0x6de210
runtime.doInit(0xa406e0)
    /usr/lib/go-1.13/src/runtime/proc.go:5222 +0x8a fp=0xc00010ded0 sp=0xc00010dea0 pc=0x43b34a
runtime.doInit(0xa3e800)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00010df00 sp=0xc00010ded0 pc=0x43b317
runtime.doInit(0xa41720)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00010df30 sp=0xc00010df00 pc=0x43b317
runtime.doInit(0xa3ea80)
    /usr/lib/go-1.13/src/runtime/proc.go:5217 +0x57 fp=0xc00010df60 sp=0xc00010df30 pc=0x43b317
runtime.main()
    /usr/lib/go-1.13/src/runtime/proc.go:190 +0x1da fp=0xc00010dfe0 sp=0xc00010df60 pc=0x42f28a
runtime.goexit()
    /usr/lib/go-1.13/src/runtime/asm_amd64.s:1357 +0x1 fp=0xc00010dfe8 sp=0xc00010dfe0 pc=0x459771
-----)
dpkg: error processing archive /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu3_amd64.deb (--unpack):
 new chromium-browser package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我在用

$ uname -a
Linux 6.2.0-20-generic #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  6 07:48:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.04
Release:    23.04
Codename:   lunar

$ snap version
snap    2.59.2
snapd   2.59.2
series  16
ubuntu  23.04
kernel  6.2.0-20-generic

答案1

这些信息可能很有用。我在使用 snap 时遇到了同样的问题:“无法根据更改挂载点更改挂载命名空间...权限被拒绝”

我找到了问题。这很奇怪。它与 AppArmor 相关联,后者负责保护 snap。在 Linux 中的 Home 目录中,我用指向另一个驱动器的同名符号链接替换了默认文件夹(图像、音乐、视频等)。看起来这导致了 AppArmor 的安全问题。我删除了符号链接并放回了文件夹,重新启动后 snap 现已启动。您可以将该解决方案应用于其他 snap。

相关内容