Snaps coming up as `broken`

About a week ago I had a couple of snaps coming up as broken and this had happened before. I want to find out why. Unfortunately I didn’t know the command for using the journalctl log at the time and I do now but I didn’t have persistent logging. The syslog is the best I can do! Hope there’s something useful there or something breaks again so I can get the journalctl log.

I’ve linked everything the particular command I used got up to the end of 28 September, which is when I posted the topic on logging (exact time: 12:23pm) so I think it was around that time that I got the broken snaps coming up.

Those logs show several snap files missing altogether from /var/lib/snapd/snaps/, which is something unusual to say the least. This is only done by snapd when snaps are actually removed, or if you remove the entire snapd package with dpkg/rpm/etc.

Have you observed any recent corruption issues in your filesystem?

Also, what filesystem are you using there? ext4?

Checked my apt logs with less /var/log/apt/history.log and zless /var/log/apt/history.log.1.gz and snapd isn’t there so I didn’t remove it. I haven’t observed any recent corruption issues, not sure how I would, files not opening? Seems to have been fine though. I’m using ext4 yes :slight_smile:

Okay, I don’t have any other ideas right now. Something must necessarily have removed those files, and at least so far we haven’t heard of any cases where snapd would do that by itself without it being a removal (in which case it wouldn’t complain afterwards).

If you see it again, please collect logs both from system and from snapd, and also have a look at snap changes to see which transactions happened recently. If you see something suspect on that list, run snap tasks <change id> and you’ll get more details on it.

1 Like