Hi,
I am running Ubuntu 18.04. I noticed this morning that snapd
was using about 20 - 40% of my CPU. I had a look at journalctl --system -f -u snapd
which gave the following:
Jun 05 10:24:39 systemd[1]: Started Snappy daemon.
Jun 05 10:24:42 snapd[5170]: storehelpers.go:438: cannot refresh snap “core”: snap has no updates available
Jun 05 14:32:22 snapd[5170]: storehelpers.go:438: cannot refresh: snap has no updates available: “core”, “core18”, “gnome-3-26-1604”, “gnome-3-28-1804”, “gnome-3-34-1804”, “gnome-calculator”, “gnome-characters”, “gnome-logs”, “gnome-system-monitor”, “gtk-common-themes”, “hugo”, “micropad”, “skype”, “spotify”
Jun 05 14:32:22 snapd[5170]: autorefresh.go:397: auto-refresh: all snaps are up-to-date
Jun 08 09:15:01 snapd[5170]: storehelpers.go:438: cannot refresh: snap has no updates available: “core”, “core18”, “gnome-3-26-1604”, “gnome-calculator”, “gnome-logs”, “gnome-system-monitor”, “gtk-common-themes”, “hugo”, “micropad”, “skype”, “spotify”
Jun 08 12:20:04 snapd[5170]: storehelpers.go:438: cannot refresh: snap has no updates available: “core”, “core18”, “gnome-3-26-1604”, “gnome-calculator”, “gnome-logs”, “gnome-system-monitor”, “gtk-common-themes”, “hugo”, “micropad”, “spotify”
Jun 09 10:02:37 snapd[5170]: 2020/06/09 10:02:37 Unsolicited response received on idle HTTP channel starting with “HTTP/1.0 408 Request Time-out\r\nCache-Control: no-cache\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>
\n”; err=<nil>
Jun 09 13:44:39 snapd[5170]: stateengine.go:150: state ensure error: Posthttps://api.snapcraft.io/v2/snaps/refresh
: dial tcp: lookupapi.snapcraft.io
: no such host
Jun 10 13:56:48 snapd[5170]: stateengine.go:150: state ensure error: Posthttps://api.snapcraft.io/v2/snaps/refresh
: dial tcp: lookupapi.snapcraft.io
: no such host
Jun 11 13:56:49 snapd[5170]: storehelpers.go:438: cannot refresh: snap has no updates available: “core”, “core18”, “gnome-3-26-1604”, “gnome-3-34-1804”, “gnome-calculator”, “gnome-characters”, “gnome-logs”, “gnome-system-monitor”, “gtk-common-themes”, “hugo”, “micropad”, “spotify”
There are a few messages in there which I didn’t understand; such as the unsolicited response
and state ensure error
messages.
Never-the-less, I had a look at
sudo snap info --verbose /var/lib/snapd/seed/snaps/*.snap | grep base:
which returned nothing.
Then I looked at snap changes
(which to be honest, I probably should have done straight away):
ID Status Spawn Ready Summary
116 Doing 4 days ago, at 12:20 BST - Auto-refresh 4 snaps
You can see that the auto-refreshing of four snaps was spawned four days ago but has apparently got stuck somewhere. I’m not sure if the reason it is stuck is given in the info above.
I then tried to remove one of my installed snaps - micropad (this is largely because I don’t use it and didn’t realise it was still there). Using sudo snap remove micropad
gave the following:
INFO Waiting for conflicting change in progress…
I left it for a few moments but this message just kept repeating. So in the end I aborted the auto-refresh using sudo snap abort 116
, removed micropad sudo snap remove micropad
and did a manual refresh sudo snap refresh
which said
All snaps are up to date.
Finally, I re-ran snap changes
which produced
ID Status Spawn Ready Summary
116 Abort 4 days ago, at 12:20 BST - Auto-refresh 4 snaps
117 Undone today at 09:33 BST today at 09:35 BST Remove “micropad” snap
118 Done today at 09:37 BST today at 09:37 BST Remove “micropad” snap
119 Done today at 09:37 BST today at 09:37 BST Refresh all snaps: no updates
Checking journalctl --system -f -u snapd
again gave the following new entries:
Jun 12 09:37:47 snapd[5170]: storehelpers.go:438: cannot refresh: snap has no updates available: “core”, “core18”, “gnome-3-26-1604”, “gnome-calculator”, “gnome-logs”, “gnome-system-monitor”, “gtk-common-themes”, “hugo”, “spotify”
Jun 12 09:37:47 snapd[5170]: snapstate.go:1042: cannot refresh snap “skype”: snap “skype” has “auto-refresh” change in progress
Jun 12 09:37:47 snapd[5170]: snapstate.go:1042: cannot refresh snap “gnome-3-34-1804”: snap “gnome-3-34-1804” has “auto-refresh” change in progress
Jun 12 09:37:47 snapd[5170]: snapstate.go:1042: cannot refresh snap “gnome-3-28-1804”: snap “gnome-3-28-1804” has “auto-refresh” change in progress
Jun 12 09:37:47 snapd[5170]: snapstate.go:1042: cannot refresh snap “gnome-characters”: snap “gnome-characters” has “auto-refresh” change in progress
So it appears that even though snap refresh
said all snaps were up to date, it actually couldn’t refresh some of the snaps as the auto-refresh is still in progress, even though the auto-refresh was aborted?
Thanks in advance for any help given.