Parallel-instances breaks content snap consumers

Hello,

I just would like to report my experience today with the parallel instance feature. Yes, it is experimental :grin:

My use-case: to be able to run 2 instances of the same snap to be able to run together 2 accounts of the same service.

So I enabled parallel instances:

sudo snap set system experimental.parallel-instances=true

Then I installed my second instance:

sudo snap install --unaliased mysnap_2 mysnap
sudo snap alias mysnap_2 mysnap-2

:sparkles: I was able to run a second instance of mysnap :clap: I was happy :grinning_face_with_smiling_eyes:

But, when I tried to launch the first instance:

error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory

And most of the other installed snaps on my computer are broken with the same error :fearful: ! (Authy, vscode, rocketchat, signal, discord …)

So before making the problem worse, what should I do?

  • Disable parallel installation? Should I remove the 2nd instance of mysnap first?
  • Should I reinstall everything?
  • Should I reboot?
  • Should I install something else?

Thank you

I’ll need a bit more information, as things seem to be working fine on my end with 2 instances of signal-desktop or ohmygiraffe snaps.

Can I get your snap somewhere? Can you run SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run <one-of-the-failing-snaps> and attach the output? Do non-snap applications work in general?

:joy: yes, everything is working fine on my Ubuntu laptop, except some snaps since I have activated parallel installation :slight_smile:

Ubuntu: 20.04.1

New information: :point_right: if I “reinstall” a broken snap (remove :arrow_right: add :arrow_right: restore (data), it works again :muscle:

Here is a broken snap, Chromium Notice the start of this snap fails for another lib: libatk-1.0.so.0

$ SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run chromium
2021/02/16 15:26:33.559402 tool_linux.go:93: DEBUG: snap (at "/snap/core/current") is older ("2.48.2.1") than distribution package ("2.48.3+20.04")
2021/02/16 15:26:33.620685 cmd_run.go:407: DEBUG: SELinux not enabled
DEBUG: umask reset, old umask was   02
DEBUG: security tag: snap.chromium.chromium
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: /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: (experimental) ensuring snap mount and data directories are mount points
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/chromium.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 chromium, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: chromium
DEBUG: snappy_udev_init
DEBUG: setup_devices_cgroup
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: write_string_to_file /sys/fs/cgroup/devices/snap.chromium.chromium/cgroup.procs 657752
DEBUG: write_string_to_file /sys/fs/cgroup/devices/snap.chromium.chromium/devices.deny a
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/mem/null 1:3
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/mem/full 1:7
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/mem/zero 1:5
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/mem/random 1:8
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/mem/urandom 1:9
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/tty/tty 5:0
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/tty/console 5:1
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/class/tty/ptmx 5:2
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 136:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 137:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 138:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 139:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 140:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 141:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 142:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/pts/slaves 143:*
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/uhid 10:239
DEBUG: running snap-device-helper add snap_chromium_chromium /dev/net/tun 10:200
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:02.0/drm/card0 226:0
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1 snap_chromium_chromium
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2 snap_chromium_chromium
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1 snap_chromium_chromium
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/renderD128 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:02.0/drm/renderD128 226:128
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/video4linux/video0 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/video4linux/video0 81:0
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/video4linux/video1 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/video4linux/video1 81:1
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/video4linux/video2 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/video4linux/video2 81:2
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/video4linux/video3 snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.2/video4linux/video3 81:3
DEBUG: run_snappy_app_dev_add: /sys/devices/virtual/mem/full snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/virtual/mem/full 1:7
DEBUG: run_snappy_app_dev_add: /sys/devices/virtual/misc/rfkill snap_chromium_chromium
DEBUG: running snap-device-helper add snap_chromium_chromium /sys/devices/virtual/misc/rfkill 10:242
DEBUG: run_snappy_app_dev_add: /sys/module/rfkill snap_chromium_chromium
DEBUG: cannot get major/minor numbers for /sys/module/rfkill
DEBUG: forked support process 657796
DEBUG: changing apparmor hat to mount-namespace-capture-helper
DEBUG: helper process waiting for command
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: block device of snap core18, revision 1988 is 7:34
DEBUG: block device of snap core18, revision 1988 is 7:34
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: joining preserved mount namespace for inspection
DEBUG: block device of the root filesystem is 7:34
DEBUG: sanity timeout reset and disabled
DEBUG: preserved mount is not stale, reusing
DEBUG: joined preserved mount namespace chromium
DEBUG: joining preserved per-user mount namespace
DEBUG: unsharing the mount namespace (per-user)
DEBUG: sc_setup_user_mounts: chromium
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: calling snapd tool snap-update-ns
DEBUG: waiting for snapd tool snap-update-ns to terminate
DEBUG: requesting changing of apparmor profile on next exec to snap-update-ns.chromium
change.go:316: DEBUG: mount name:"/run/user/1000/doc/by-app/snap.chromium" dir:"/run/user/1000/doc" type:"none" opts:MS_BIND unparsed:"" (error: <nil>)
DEBUG: snap-update-ns finished successfully
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: NOT preserving per-user mount namespace
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: moved process 657752 to cgroup hierarchy /sys/fs/cgroup/freezer/snap.chromium
DEBUG: releasing lock 7
DEBUG: sending command 0 to helper process (pid: 657796)
DEBUG: waiting for response from helper
DEBUG: sanity timeout reset and disabled
DEBUG: helper process received command 0
DEBUG: helper process exiting
DEBUG: waiting for the helper process to exit
DEBUG: helper process exited normally
DEBUG: resetting PATH to values in sync with core snap
DEBUG: set_effective_identity uid:1000 (change: yes), gid:1000 (change: yes)
DEBUG: creating user data directory: /home/my_user/snap/chromium/1479
DEBUG: requesting changing of apparmor profile on next exec to snap.chromium.chromium
DEBUG: ruid: 1000, euid: 1000, suid: 0
DEBUG: setting capabilities bounding set
DEBUG: regaining SYS_ADMIN
DEBUG: loading bpf program for security tag snap.chromium.chromium
DEBUG: read 7024 bytes from /var/lib/snapd/seccomp/bpf//snap.chromium.chromium.bin
DEBUG: read 152 bytes from /var/lib/snapd/seccomp/bpf/global.bin
DEBUG: clearing SYS_ADMIN
DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...)
DEBUG:  argv[1] = chromium
DEBUG: umask restored to   02
DEBUG: working directory restored to /home/my_user
/snap/chromium/1479/usr/lib/chromium-browser/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory

Gimp

SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run gimp
2021/02/16 19:08:08.858307 tool_linux.go:93: DEBUG: snap (at "/snap/core/current") is older ("2.48.2.1") than distribution package ("2.48.3+20.04")
2021/02/16 19:08:08.868553 cmd_run.go:407: DEBUG: SELinux not enabled
DEBUG: umask reset, old umask was   02
DEBUG: security tag: snap.gimp.gimp
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: /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: (experimental) ensuring snap mount and data directories are mount points
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/gimp.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 gimp, uid 0)
DEBUG: sanity timeout reset and disabled
DEBUG: initializing mount namespace: gimp
DEBUG: snappy_udev_init
DEBUG: setup_devices_cgroup
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: write_string_to_file /sys/fs/cgroup/devices/snap.gimp.gimp/cgroup.procs 670998
DEBUG: write_string_to_file /sys/fs/cgroup/devices/snap.gimp.gimp/devices.deny a
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/mem/null 1:3
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/mem/full 1:7
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/mem/zero 1:5
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/mem/random 1:8
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/mem/urandom 1:9
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/tty/tty 5:0
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/tty/console 5:1
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/class/tty/ptmx 5:2
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 136:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 137:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 138:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 139:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 140:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 141:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 142:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/pts/slaves 143:*
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/uhid 10:239
DEBUG: running snap-device-helper add snap_gimp_gimp /dev/net/tun 10:200
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0 snap_gimp_gimp
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/devices/pci0000:00/0000:00:02.0/drm/card0 226:0
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1 snap_gimp_gimp
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-1
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2 snap_gimp_gimp
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-DP-2
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1 snap_gimp_gimp
DEBUG: cannot get major/minor numbers for /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1
DEBUG: run_snappy_app_dev_add: /sys/devices/pci0000:00/0000:00:02.0/drm/renderD128 snap_gimp_gimp
DEBUG: running snap-device-helper add snap_gimp_gimp /sys/devices/pci0000:00/0000:00:02.0/drm/renderD128 226:128
DEBUG: forked support process 671033
DEBUG: changing apparmor hat to mount-namespace-capture-helper
DEBUG: helper process waiting for command
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: block device of snap core18, revision 1988 is 7:34
DEBUG: block device of snap core18, revision 1988 is 7:34
DEBUG: sanity timeout initialized and set for 30 seconds
DEBUG: joining preserved mount namespace for inspection
DEBUG: block device of the root filesystem is 7:34
DEBUG: sanity timeout reset and disabled
DEBUG: preserved mount is not stale, reusing
DEBUG: joined preserved mount namespace gimp
DEBUG: joining preserved per-user mount namespace
DEBUG: unsharing the mount namespace (per-user)
DEBUG: sc_setup_user_mounts: gimp
DEBUG: performing operation: (disabled) use debug build to see details
DEBUG: set_effective_identity uid:0 (change: no), gid:0 (change: yes)
DEBUG: calling snapd tool snap-update-ns
DEBUG: waiting for snapd tool snap-update-ns to terminate
DEBUG: requesting changing of apparmor profile on next exec to snap-update-ns.gimp
change.go:316: DEBUG: mount name:"/run/user/1000/doc/by-app/snap.gimp" dir:"/run/user/1000/doc" type:"none" opts:MS_BIND unparsed:"" (error: <nil>)
DEBUG: snap-update-ns finished successfully
DEBUG: set_effective_identity uid:0 (change: no), gid:1000 (change: yes)
DEBUG: NOT preserving per-user mount namespace
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: moved process 670998 to cgroup hierarchy /sys/fs/cgroup/freezer/snap.gimp
DEBUG: releasing lock 7
DEBUG: sending command 0 to helper process (pid: 671033)
DEBUG: waiting for response from helper
DEBUG: sanity timeout reset and disabled
DEBUG: helper process received command 0
DEBUG: helper process exiting
DEBUG: waiting for the helper process to exit
DEBUG: helper process exited normally
DEBUG: resetting PATH to values in sync with core snap
DEBUG: set_effective_identity uid:1000 (change: yes), gid:1000 (change: yes)
DEBUG: creating user data directory: /home/my_user/snap/gimp/322
DEBUG: requesting changing of apparmor profile on next exec to snap.gimp.gimp
DEBUG: ruid: 1000, euid: 1000, suid: 0
DEBUG: setting capabilities bounding set
DEBUG: regaining SYS_ADMIN
DEBUG: loading bpf program for security tag snap.gimp.gimp
DEBUG: read 6968 bytes from /var/lib/snapd/seccomp/bpf//snap.gimp.gimp.bin
DEBUG: read 152 bytes from /var/lib/snapd/seccomp/bpf/global.bin
DEBUG: clearing SYS_ADMIN
DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...)
DEBUG:  argv[1] = gimp
DEBUG: umask restored to   02
DEBUG: working directory restored to /home/my_user/dev/uns/docs
/snap/gimp/322/usr/bin/gimp: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory

Can you attach the output of snap list --all and snap connections gimp ?

snap list --all
Name                     Version                     Rev    Tracking         Publisher         Notes
android-studio           4.1.1.0                     98     latest/stable    snapcrafters      désactivé,classic
android-studio           4.1.2.0                     99     latest/stable    snapcrafters      classic
authy                    1.8.3                       5      latest/beta      twilio-authy      -
canonical-livepatch      9.5.2                       94     latest/stable    canonical✓        désactivé
canonical-livepatch      9.5.5                       95     latest/stable    canonical✓        -
chromium                 88.0.4324.150               1479   latest/stable    canonical✓        -
chromium                 88.0.4324.146               1475   latest/stable    canonical✓        désactivé
code                     622cb03f                    55     latest/stable    vscode✓           classic
code                     5d424b82                    54     latest/stable    vscode✓           désactivé,classic
core                     16-2.48.2.1                 10823  latest/stable    canonical✓        core
core                     16-2.48.2                   10583  latest/stable    canonical✓        core,désactivé
core18                   20201210                    1944   latest/stable    canonical✓        base,désactivé
core18                   20210128                    1988   latest/stable    canonical✓        base
core20                   20201210                    904    latest/stable    canonical✓        base
core20                   20201027                    875    latest/stable    canonical✓        base,désactivé
discord                  0.0.13                      120    latest/stable    snapcrafters      -
discord_second           0.0.13                      120    latest/stable    snapcrafters      -
drawio                   14.1.8                      99     latest/stable    jgraph✓           -
drawio                   14.1.5                      98     latest/stable    jgraph✓           désactivé
flameshot-app            v0.6.0+git63.19d7010        x1     -                -                 -
gimp                     2.10.20                     297    latest/stable    snapcrafters      désactivé
gimp                     2.10.22                     322    latest/stable    snapcrafters      -
gnome-3-26-1604          3.26.0.20191114             98     latest/stable/…  canonical✓        désactivé
gnome-3-26-1604          3.26.0.20200529             100    latest/stable/…  canonical✓        -
gnome-3-28-1804          3.28.0-17-gde3d74c.de3d74c  128    latest/stable    canonical✓        désactivé
gnome-3-28-1804          3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical✓        -
gnome-3-34-1804          0+git.3556cb3               66     latest/stable    canonical✓        -
gnome-3-34-1804          0+git.3556cb3               60     latest/stable    canonical✓        désactivé
gnome-system-monitor     3.38.0-17-g38c1ce1d62       157    latest/stable/…  canonical✓        -
gnome-system-monitor     3.36.0-12-g35f88a56d7       148    latest/stable/…  canonical✓        désactivé
gtk-common-themes        0.1-44-gb73fa2d             1513   latest/stable/…  canonical✓        désactivé
gtk-common-themes        0.1-50-gf7627e4             1514   latest/stable/…  canonical✓        -
gtk2-common-themes       0.1                         9      latest/stable    canonical✓        désactivé
gtk2-common-themes       0.1                         13     latest/stable    canonical✓        -
intellij-idea-community  2020.3.2                    273    latest/stable    jetbrains✓        classic
intellij-idea-community  2020.3.1                    270    latest/stable    jetbrains✓        désactivé,classic
kde-frameworks-5-core18  5.61.0                      32     latest/stable    kde✓              -
kubectl                  1.20.2                      1811   latest/stable    canonical✓        classic
kubectl                  1.20.2                      1787   latest/stable    canonical✓        désactivé,classic
pick-colour-picker       1.51-e54bc02                238    latest/stable    sil               -
pinta-james-carroll      1.7                         8      latest/stable    james-carroll     -
pinta-james-carroll      1.7                         6      latest/stable    james-carroll     désactivé
poedit                   2.4.2                       27     latest/stable    vslavik           -
poedit                   2.4.1                       26     latest/stable    vslavik           désactivé
ripgrep                  12.1.0                      9      latest/stable    icey              classic
ripgrep                  11.0.2                      8      latest/stable    icey              désactivé,classic
rocketchat-desktop       3.2.0-snapshot              321    latest/stable    rocketchat✓       désactivé
rocketchat-desktop       3.0.1                       196    latest/stable    rocketchat✓       -
scratux                  1.4.1                       7      latest/stable    joancipria        -
scrcpy                   v1.16                       256    latest/stable    sisco311          désactivé
scrcpy                   v1.17                       269    latest/stable    sisco311          -
signal-desktop           1.39.5                      345    latest/stable    snapcrafters      désactivé
signal-desktop           1.39.6                      346    latest/stable    snapcrafters      -
slack                    4.12.2                      36     latest/stable    slack✓            classic
slack                    4.12.1                      35     latest/stable    slack✓            désactivé,classic
snap-store               3.38.0-55-geb45541          498    latest/stable/…  canonical✓        désactivé
snap-store               3.38.0-59-g494f078          518    latest/stable/…  canonical✓        -
snapcraft                4.5.1                       6050   latest/stable/…  canonical✓        classic
snapcraft                4.4.4                       5821   latest/stable/…  canonical✓        désactivé,classic
spotify                  1.1.42.622.gbd112320-37     42     latest/stable    spotify✓          désactivé
spotify                  1.1.46.916.g416cacf1        43     latest/stable    spotify✓          -
squirrelsql              4.1.0                       89     latest/stable    jibel             -
telegram-desktop         2.5.8                       2398   latest/stable    telegram.desktop  -
telegram-desktop         2.5.7-4-g7947af665          2391   latest/stable    telegram.desktop  désactivé
todoist                  0.2.4                       4      latest/stable    doist✓            -
snap connections gimp
Interface                             Plug                        Slot                                                  Notes
content[gnome-3-28-1804]              gimp:gnome-3-28-1804        gnome-3-28-1804:gnome-3-28-1804                       -
content[gtk-3-themes]                 gimp:gtk-3-themes           gtk-common-themes:gtk-3-themes                        -
content[icon-themes]                  gimp:icon-themes            gtk-common-themes:icon-themes                         -
content[kde-frameworks-5-core18-all]  gimp:kde-frameworks-5-plug  kde-frameworks-5-core18:kde-frameworks-5-core18-slot  -
content[sound-themes]                 gimp:sound-themes           gtk-common-themes:sound-themes                        -
cups-control                          gimp:cups-control           -                                                     -
dbus                                  -                           gimp:dbus-gimp                                        -
desktop                               gimp:desktop                :desktop                                              -
desktop-legacy                        gimp:desktop-legacy         :desktop-legacy                                       -
gsettings                             gimp:gsettings              :gsettings                                            -
home                                  gimp:home                   :home                                                 -
network                               gimp:network                :network                                              -
opengl                                gimp:opengl                 :opengl                                               -
removable-media                       gimp:removable-media        -                                                     -
unity7                                gimp:unity7                 :unity7                                               -
wayland                               gimp:wayland                :wayland                                              -
x11                                   gimp:x11                    :x11                                                  -

Looks ok. Not quite sure what may be wrong, so let’s keep on digging.
First run:

snap run --shell gimp
# when in the snap shell
$ env | grep LD

Then, once you exit the shell, try running:

sudo nsenter -m/run/snapd/ns/gimp.mnt /bin/findmnt

then collect the output of both commands and paste it. If it’s too large, you can use https://paste.ubuntu.com and include a link to the pastebin in your reply.

env | grep LD
LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/gimp/322/lib/x86_64-linux-gnu:/snap/gimp/322/usr/lib:/snap/gimp/322/usr/lib/x86_64-linux-gnu:/snap/gimp/322/usr/lib/x86_64-linux-gnu/blas:/snap/gimp/322/usr/lib/x86_64-linux-gnu/graphviz:/snap/gimp/322/usr/lib/x86_64-linux-gnu/gvfs:/snap/gimp/322/usr/lib/x86_64-linux-gnu/lapack:/snap/gimp/322/usr/lib/x86_64-linux-gnu/pulseaudio:/snap/gimp/322/usr/lib/x86_64-linux-gnu/lapack:/snap/gimp/322/usr/lib/x86_64-linux-gnu/blas::/snap/gimp/322/lib:/snap/gimp/322/usr/lib:/snap/gimp/322/lib/x86_64-linux-gnu:/snap/gimp/322/usr/lib/x86_64-linux-gnu:/var/lib/snapd/lib/gl
OLDPWD=[redacted]
LD_PRELOAD=:/snap/gimp/322/lib/bindtextdomain.so

https://paste.ubuntu.com/p/QMn5qZFw6b/

The mounts look ok, for instance, libX11 comes from gnome-platform snap, which is bind mounted at the right location:

### gnome-platform snap on /dev/loop55
| |-/snap/gnome-3-28-1804/145                                     /dev/loop55                                                            squashfs        ro,nodev,relatime
| |-/snap/squirrelsql/89                                          /dev/loop54                                                            squashfs        ro,nodev,relatime
| |-/snap/gnome-3-28-1804/128                                     /dev/loop53                                                            squashfs        ro,nodev,relatime
| |-/snap/gimp/322                                                /dev/loop57                                                            squashfs        ro,nodev,relatime
#### bind mounted right here
| | |-/snap/gimp/322/data-dir/gnome-platform                      /dev/loop55

So clearly the libraries are there. However, the LD_LIBRARY_PATH is incorrect, and that is what makes things break. The following locations are missing from your env variable, but are present in mine:

/snap/gimp/322/data-dir/gnome-platform/lib/x86_64-linux-gnu
/snap/gimp/322/data-dir/gnome-platform/usr/lib/x86_64-linux-gnu
/snap/gimp/322/data-dir/gnome-platform/usr/lib
/snap/gimp/322/data-dir/gnome-platform/lib
/snap/gimp/322/data-dir/gnome-platform/usr/lib/x86_64-linux-gnu/dri
/snap/gimp/322/data-dir/gnome-platform/usr/lib/x86_64-linux-gnu/pulseaudio
/snap/gimp/322/data-dir/kf5/lib/x86_64-linux-gnu
/snap/gimp/322/data-dir/kf5/usr/lib/x86_64-linux-gnu
/snap/gimp/322/data-dir/kf5/usr/lib
/snap/gimp/322/data-dir/kf5/lib

There’s some desktop glue code that appends those locations to LD_LIBRARY_PATH, and may not do so if the location is not a directory (or doesn’t exist).
I tried with a clean 20.04 VM and executed the following steps:

  • install gimp snap and run it
  • enable experimental.parallel-installs
  • install hello-world_foo and run it (this has a side effect that /snap becomes a mount point)
  • gimp snap fails at this point, complaining about missing libraries
  • –shell gimp shows that LD_LIBRARY_PATH is missing directories located under $SNAP/data-dir/gnome-platform
  • as suspected $SNAP/data-dir/gnome-platform/ is empty
  • findmnt still shows that gnome-platform (from /dev/loop*) is mounted under $SNAP/data-dir/gnome-platform/ (even though there’s obviously no content from it)

In this case, the problem can be ‘fixed’ while keeping the parallel installs feature enable, by either discarding the mount namespace if the affected snap (eg. sudo /usr/lib/snapd/snap-discard-ns gimp), or just rebooting.

I’ll put this in my TODO list and try to find a fix for the next snapd release.

A reboot fixed the issue for me.
All snaps are working again.

Thank you

Great. Parallel Installs docs have also been updated to recommend rebooting the system after toggling the flag.

1 Like