All snaps showing as 'broken'


#1

Been doing some testing in a 14.04 VM and none of my snaps launch, and all show as ‘broken’. Previously @Ads20000 reported a similar problem, @niemeyer suggested a new post when/if it happens again, so here we are :slight_smile:

alan@alan-VirtualBox:~$ snap list
Name               Version                  Rev   Developer      Notes
brave                                       8     brave          broken
core                                        3517  canonical      broken
discord-test                                5     flexiondotorg  broken
gedit                                       34    canonical      broken
gnome-3-26-1604                             27    canonical      broken
gnome-characters   3.26.2                   38    canonical      -
gnome-sudoku                                22    canonical      broken
heroku                                      1513  dickeyxxx      broken
mailspring                                  73    foundry376     broken
nextcloud          11.0.5snap2              3680  nextcloud      -
node-red                                    56    dcj            broken
ohmygiraffe                                 3     popey          broken
pycharm-community                           39    jetbrains      broken
shellcheck                                  x2                   broken
skype                                       x1                   broken
snapcraft                                   876   canonical      broken
teleconsole                                 3     popey          broken

The snap files themselves exist on disk.

alan@alan-VirtualBox:~$ ls -l /var/lib/snapd/snaps
total 3298368
-rw-r--r-- 1 root root 162717696 Nov 10 12:56 brave_8.snap
-rw-r--r-- 1 root root  87875584 Nov 10 12:15 core_3396.snap
-rw-r--r-- 1 root root  87793664 Nov 24 10:38 core_3440.snap
-rw-r--r-- 1 root root  87859200 Nov 30 17:03 core_3517.snap
-rw-r--r-- 1 root root 116383744 Mar  7  2017 discord-test_3.snap
-rw-r--r-- 1 root root 116383744 Mar 15  2017 discord-test_5.snap
-rw------- 1 root root 160444416 Nov 30 17:12 firefox_x1.snap
-rw-r--r-- 1 root root   4222976 Oct 27 15:21 gedit_30.snap
-rw-r--r-- 1 root root   4247552 Nov 10 12:15 gedit_31.snap
-rw-r--r-- 1 root root   4247552 Nov 30 17:03 gedit_34.snap
-rw-r--r-- 1 root root 134303744 Oct 27 15:21 gnome-3-26-1604_21.snap
-rw-r--r-- 1 root root 135131136 Nov 10 12:15 gnome-3-26-1604_25.snap
-rw-r--r-- 2 root root 135569408 Nov 24 10:39 gnome-3-26-1604_27.snap
-rw-r--r-- 1 root root  12787712 Nov 10 12:15 gnome-characters_23.snap
-rw-r--r-- 1 root root  12791808 Nov 24 10:38 gnome-characters_26.snap
-rw-r--r-- 1 root root  12791808 Nov 30 17:03 gnome-characters_38.snap
-rw-r--r-- 1 root root   2949120 Oct 27 15:21 gnome-sudoku_17.snap
-rw-r--r-- 1 root root   2949120 Nov 10 12:15 gnome-sudoku_19.snap
-rw-r--r-- 1 root root   2945024 Nov 30 17:03 gnome-sudoku_22.snap
-rw-r--r-- 2 root root  38203392 Nov 24 10:43 heroku_1513.snap
-rw-r--r-- 1 root root 161517568 Nov 10 13:07 mailspring_67.snap
-rw-r--r-- 2 root root 161484800 Nov 24 10:39 mailspring_70.snap
-rw-r--r-- 2 root root 161468416 Nov 30 17:05 mailspring_73.snap
-rw-r--r-- 1 root root 191303680 Nov 10 12:17 nextcloud_3680.snap
-rw-r--r-- 1 root root  66555904 Nov 10 13:00 node-red_52.snap
-rw-r--r-- 1 root root  66113536 Nov 10 13:07 node-red_56.snap
-rw-r--r-- 1 root root  28651520 Feb  7  2017 ohmygiraffe_3.snap
drwxr-xr-x 2 root root      4096 Jan 17  2017 partial
-rw-r--r-- 1 root root 194240512 Nov 10 12:24 pycharm-community_33.snap
-rw-r--r-- 1 root root 268070912 Nov 30 17:04 pycharm-community_39.snap
-rw------- 1 root root   3072000 Feb  3  2017 shellcheck_x1.snap
-rw------- 1 root root   6750208 Feb  3  2017 shellcheck_x2.snap
-rw------- 1 root root 240185344 Dec  1 08:32 skype_x1.snap
-rw-r--r-- 1 root root  53592064 Nov 24 10:38 snapcraft_837.snap
-rw-r--r-- 2 root root  53690368 Nov 30 17:04 snapcraft_871.snap
-rw-r--r-- 1 root root  53612544 Dec  1 00:12 snapcraft_876.snap
-rw-r--r-- 1 root root 169832448 Aug 18 12:20 spotify_1.snap
-rw------- 1 root root 167456768 Nov 30 17:15 spotify_x1.snap
-rw-r--r-- 1 root root   3616768 Feb  3  2017 teleconsole_1.snap
-rw-r--r-- 1 root root   3661824 Oct  6 15:27 teleconsole_3.snap

This is the version of snapd…

alan@alan-VirtualBox:~$ snap version
snap    2.28.5~14.04
snapd   2.28.5~14.04
series  16
ubuntu  14.04
kernel  4.4.0-101-generic
alan@alan-VirtualBox:~$ snap info core
name:      core
summary:   snapd runtime environment
publisher: canonical
contact:   snappy-canonical-storeaccount@canonical.com
description: |
  The core runtime environment for snapd
snap-id:     99T7MUlRhtI3U0QFgl5mXXESAiSwt776
tracking:    candidate
installed:     (3517) 0B broken
refreshed:   2017-11-30 17:03:52.19701 +0000 UTC
channels:                                      
  stable:    16-2.29.3                  (3440) 87MB -
  candidate: 16-2.29.4                  (3517) 87MB -
  beta:      16-2.29.4.2                (3604) 87MB -
  edge:      16-2.30~rc1+git467.c2f9631 (3615) 87MB -

Nothing particularly odd in snap changes

alan@alan-VirtualBox:~$ snap changes
ID   Status  Spawn                 Ready                 Summary
44   Done    2017-11-30T17:03:29Z  2017-11-30T17:05:17Z  Auto-refresh 7 snaps
45   Done    2017-11-30T17:07:08Z  2017-11-30T17:07:13Z  Install "sss" snap from file "sss_4.snap"
46   Done    2017-11-30T17:12:29Z  2017-11-30T17:12:32Z  Install "fff" snap from file "fff-58.0b7.snap"
47   Done    2017-11-30T17:15:59Z  2017-11-30T17:16:02Z  Install "rrr" snap from file "rrr_2.snap"
48   Done    2017-11-30T18:16:45Z  2017-11-30T18:16:47Z  Remove "sss" snap
49   Error   2017-11-30T18:17:56Z  2017-11-30T18:17:57Z  Install "sss" snap from file "sss_4.snap"
50   Done    2017-11-30T18:18:05Z  2017-11-30T18:18:06Z  Install "sss" snap from file "sss_4.snap"
51   Done    2017-12-01T00:12:52Z  2017-12-01T00:12:57Z  Auto-refresh snap "snapcraft"
52   Done    2017-12-01T08:31:43Z  2017-12-01T08:31:43Z  Remove "sss" snap
53   Done    2017-12-01T08:32:02Z  2017-12-01T08:32:03Z  Install "sss" snap from file "sss_4.snap"

What other logs do you need from this system? I have frozen the VM.


On Arch snaps show broken after switch from snapd to snapd-git
#2

I thought this is related to snapd starting before the snaps are mounted and thinking there is nothing there. I thought we had a fix or tried to fix it at least. cc @zyga


#3

Thanks for your post about this problem! We looked at this some days ago and the fix went into https://github.com/snapcore/snapd/pull/4081 - the fix is part of the 2.29 stable release.

One complication is that we currently do not rewrite existing mount units, so all the new mount units for new snaps will be fine, but the old one may still show up in the broken state.


#4

I still have the ‘broken’ issue with core 4110.

mount | grep snap

probably reveals, that some of the ‘broken’ images are not mounted.

cd /etc/systemd/system
ls *.mount | sudo xargs systemctl start

mounts these images and a following

snap list

should show at least these before broken snaps as fine


Custom disk location for certain snaps