Content provider interfaces introduced to snaps aren't correctly set up

Bug #1781906 reported by Marco Trevisan (Treviño)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
High
Zygmunt Krynicki

Bug Description

This happened in the telegram-snap (and others that I don't manage, so I can't define a list or detailed changes), but it happened the first time when I introduced the usage of the `desktop` plug, and now again once adding the content interfaces provided by gtk-common-themes.

Here's what happened:
 1) telegram-desktop was providing fonts and etc
 2) Added the `desktop` plug
 3) Most of users who have auto-refreshed the snap have an
    empty /usr/share/fonts mount point
 3) I started using the gtk-common-themes interface to provide resources:
    https://github.com/3v1n0/telegram-snap/commit/4f4c3ce8fbce1a8d36
 4) Fresh install works fine
 5) After auto-refreshing the snap in some machines (here too) nothing is
    mounted in my $SNAP/usr/share/

All this is generally fixed by uninstalling and reinstalling the snap. Next refreshes are fine.

This has been already briefly discussed at the previous engineering sprint.

Zygmunt Krynicki (zyga)
Changed in snappy:
assignee: nobody → Zygmunt Krynicki (zyga)
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I will attempt to reproduce this but you could provide some additional details that would help:

- the before and after revision numbers (so that I can reproduce this precisely)
- the content of /run/snapd/ns/snap.telegram-desktop.fstab
- the content of /var/lib/snapd/mount/snap.telegram-desktop.fstab
- the output of:
  run: $ nsenter -m/run/snapd/ns/telegram-desktop.mnt
  in the new shell run: cat /proc/self/mountinfo

Zygmunt Krynicki (zyga)
Changed in snappy:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Download full text (5.4 KiB)

Current stable (233) is still not using content interface, while edge (248 right now) does use content interface.

marco@tricky:~:✗ $ cat /run/snapd/ns/snap.telegram-desktop.fstab
/var/lib/snapd/hostfs/usr/local/share/fonts /usr/local/share/fonts none bind,ro 0 0
/var/lib/snapd/hostfs/usr/share/fonts /usr/share/fonts none bind,ro 0 0
/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0

marco@tricky:~:✓ $ cat /var/lib/snapd/mount/snap.telegram-desktop.fstab
/snap/gtk-common-themes/319/share/icons/Adwaita /snap/telegram-desktop/248/usr/share/icons/Adwaita none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/hicolor /snap/telegram-desktop/248/usr/share/icons/hicolor none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/HighContrast /snap/telegram-desktop/248/usr/share/icons/HighContrast none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/Humanity /snap/telegram-desktop/248/usr/share/icons/Humanity none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/Humanity-Dark /snap/telegram-desktop/248/usr/share/icons/Humanity-Dark none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/ubuntu-mono-dark /snap/telegram-desktop/248/usr/share/icons/ubuntu-mono-dark none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/ubuntu-mono-light /snap/telegram-desktop/248/usr/share/icons/ubuntu-mono-light none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/DMZ-Black /snap/telegram-desktop/248/usr/share/icons/DMZ-Black none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/DMZ-White /snap/telegram-desktop/248/usr/share/icons/DMZ-White none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/Solus /snap/telegram-desktop/248/usr/share/icons/Solus none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/communitheme /snap/telegram-desktop/248/usr/share/icons/communitheme none bind,ro 0 0
/snap/gtk-common-themes/319/share/icons/Suru /snap/telegram-desktop/248/usr/share/icons/Suru none bind,ro 0 0
/var/lib/snapd/hostfs/usr/share/fonts /usr/share/fonts none bind,ro 0 0
/var/lib/snapd/hostfs/usr/local/share/fonts /usr/local/share/fonts none bind,ro 0 0
/var/lib/snapd/hostfs/var/cache/fontconfig /var/cache/fontconfig none bind,ro 0 0
/snap/gtk-common-themes/319/share/sounds/communitheme /snap/telegram-desktop/248/usr/share/sounds/communitheme none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/Adwaita /snap/telegram-desktop/248/usr/share/themes/Adwaita none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/Adwaita-dark /snap/telegram-desktop/248/usr/share/themes/Adwaita-dark none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/HighContrast /snap/telegram-desktop/248/usr/share/themes/HighContrast none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/Ambiance /snap/telegram-desktop/248/usr/share/themes/Ambiance none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/Radiance /snap/telegram-desktop/248/usr/share/themes/Radiance none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/EvoPop /snap/telegram-desktop/248/usr/share/themes/EvoPop none bind,ro 0 0
/snap/gtk-common-themes/319/share/themes/EvoPop-Azure /snap/telegram-desktop/248/usr/share/themes/EvoPop-Azure none bind,ro 0 0
/snap/gtk-common-themes...

Read more...

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

Thank you for the data, it is very interesting. I need to check some things now.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks like this issue is still happening. Even for new installs (willcooke provided the following data).

Connection is fine: https://paste.ubuntu.com/p/3fV6NRwvmb/

snap run --shell telegram-desktop -c 'find $SNAP/usr/share/themes'
find: '/snap/telegram-desktop/281/usr/share/themes': No such file or directory

That happens on a broken system, while when the mount happened properly, theme files are of course listed.

Revision history for this message
Will Cooke (willcooke) wrote :

Logs as requested.

snap changes:
$ snap changes
ID Status Spawn Ready Summary
385 Done today at 12:03 BST today at 12:04 BST Install "telegram-desktop" snap from "edge" channel

snap changes: https://paste.ubuntu.com/p/rmTcSFZGG9/
journal: https://paste.ubuntu.com/p/Zz3W8dRPXF/
fstab: https://paste.ubuntu.com/p/7Fdr9nfJYm/

/run/snapd/ns/snap.telegram-desktop.fstab: https://paste.ubuntu.com/p/nVnJDVdjgS/

Revision history for this message
Will Cooke (willcooke) wrote :

$ ls -l /snap/gtk-common-themes/701/share/icons/Suru
lrwxrwxrwx 1 root root 12 Sep 11 16:56 /snap/gtk-common-themes/701/share/icons/Suru -> communitheme

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ah, missing thing from the irc log:

$ sudo /usr/lib/snapd/snap-update-ns telegram-desktop
2018/09/27 13:08:53.110962 main.go:192: cannot change mount namespace of snap "telegram-desktop" according to change mount (/snap/gtk-common-themes/701/share/icons/Suru /snap/telegram-desktop/281/usr/share/icons/Suru none bind,ro 0 0): cannot use "/snap/gtk-common-themes/701/share/icons/Suru" as bind-mount source: not a directory

This is probably the issue, as per:

$ ls -l /snap/gtk-common-themes/701/share/icons/Suru
lrwxrwxrwx 1 root root 12 Sep 11 16:56 /snap/gtk-common-themes/701/share/icons/Suru -> communitheme

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I believe the snapd side of this issue is fixed now.

Changed in snappy:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.