Error message trying to refresh or uninstalling a snap ( gimp )

Bug #1884849 reported by Coeur Noir
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
snapd
Fix Released
High
Zygmunt Krynicki

Bug Description

Hi,

as suggested here : https://forum.snapcraft.io/t/gimp-ubuntu-16-04-suddenly-stops-working/18393/8?u=coeur-noir

I had some error messages following auto-refresh for gimp or trying to uninstall this snap, on Ubuntu 16.04 ( this did not happen on 20.04 ).

When trying to launch it :

palace4@proliant:~$ gimp
ln: failed to create symbolic link '/home/palace4/snap/gimp/273/.config/gtk-2.0/gtkfilechooser.ini': File exists
/snap/gimp/273/usr/bin/gimp: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory
palace4@proliant:~$

And if trying to remove it :

palace4@proliant:~$ sudo snap remove gimp
error: cannot perform the following tasks:
- Disconnect gimp:removable-media from snapd:removable-media (cannot update mount namespace of snap "gimp": cannot update preserved namespace of snap "gimp":
-----
update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0): invalid argument
cannot update snap namespace: no such file or directory
-----)
palace4@proliant:~$

It's related to a newer version of gimp :

palace4@proliant:~$ snap changes
ID Status Spawn Ready Summary
7 Error today at 00:59 CEST today at 00:59 CEST Auto-refresh snap "gimp"
8 Error today at 06:19 CEST today at 06:19 CEST Auto-refresh snap "gimp"
9 Error today at 16:04 CEST today at 16:04 CEST Auto-refresh snap "gimp"
10 Error today at 19:58 CEST today at 19:58 CEST Remove "gimp" snap
11 Error today at 20:00 CEST today at 20:00 CEST Remove "gimp" snap
12 Error today at 20:59 CEST today at 20:59 CEST Auto-refresh snaps "gtk2-common-themes", "gimp"

palace4@proliant:~$

If trying manually :

palace4@proliant:~$ sudo snap refresh
[sudo] Mot de passe de palace4 :
error: cannot perform the following tasks:
- Setup snap "gimp" (281) security profiles (cannot update mount namespace of snap "gimp": cannot update preserved namespace of snap "gimp":
-----
update.go:85: cannot change mount namespace according to change unmount (/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0): invalid argument
cannot update snap namespace: no such file or directory
-----)
palace4@proliant:~$

Finally this has solved the issue :

palace4@proliant:~$ sudo /usr/lib/snapd/snap-discard-ns gimp
[sudo] Mot de passe de palace4 :
palace4@proliant:~$ sudo snap refresh
gimp 2.10.20 from Snapcrafters refreshed
palace4@proliant:~$ gimp
ln: failed to create symbolic link '/home/palace4/snap/gimp/281/.config/gtk-2.0/gtkfilechooser.ini': File exists
Gtk-Message: 22:09:23.760: Failed to load module "overlay-scrollbar"
/snap/gimp/281/usr/bin/gimp: Gimp-Widgets-AVERTISSEMENT: parse_iso_codes: error parsing '/build/gimp/parts/gimp/install/usr/share/xml/iso-codes/iso_639.xml': No such file or directory

Gtk-Message: 22:09:29.759: Failed to load module "overlay-scrollbar"
Gtk-Message: 22:09:37.780: Failed to load module "overlay-scrollbar"
/snap/gimp/281/usr/bin/gimp: LibGimpBase-AVERTISSEMENT: gimp: gimp_wire_read(): error
Gtk-Message: 22:09:38.911: Failed to load module "overlay-scrollbar"
Gtk-Message: 22:09:39.332: Failed to load module "overlay-scrollbar"
gimp_check_updates_callback: loading of https://gimp.org/gimp_versions.json failed: Operation not supported

I hope it makes sense for you ;-)

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Zyga you're probably the right person to look at the bug.

Changed in snapd:
assignee: nobody → Zygmunt Krynicki (zyga)
Changed in snapd:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Similar problem reported a day later, also for gimp: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1884930

Zygmunt Krynicki (zyga)
Changed in snapd:
status: Triaged → In Progress
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I was unable to reproduce this yet but looking at the errors I have an idea what can be going on. I will try to write a test case to artificially force a condition where this would happen and adjust the code to handle it.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I've proposed a pull request that addresses the symptom you've experienced:

https://github.com/snapcore/snapd/pull/8961

Changed in snapd:
status: In Progress → Fix Committed
Changed in snapd:
status: Fix Committed → Fix Released
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.