Can't cope with crashing snap in auto-refresh status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
snapd can get in a state where it's impossible to stop or remove a snap.
I was following
https:/
trying to run microk8s as a snap on Ubuntu Core 20, running on a raspberry Pi 4 with 8GB RAM.
As recommended, I did
snap install microk8s --channel=
which, instead of the version v1.22.3 mentioned in the tutorial, brought in v1.23.0, which was crashing due to several bugs and flaws (microk8s inspect reveals).
Today, after booting the machine, it auto-refreshed itself into the latest core version, and after rebooting, updated the microk8s snap to v1.23.1.
The problem is, that the bugs in microk8s still exist, it goes into an endless loop, restaring kubelite, occupying between 100% and 250% cpu, due to several bugs.
But now, I can't get rid of it in a clean way:
# snap disable microk8s
error: snap "microk8s" has "auto-refresh" change in progress
# snap remove microk8s
error: snap "microk8s" has "auto-refresh" change in progress
# snap stop microk8s
error: snap "microk8s" has "auto-refresh" change in progress
since the buggy snap never finishes it's auto-refresh due to its bugs.
I do consider this as a security vulnerability, because someone could intentionally build a snap that cannot be stopped or removed anymore (by regular administrative steps).
Hi, can you provide the output of `snap changes` and also specify how long you waited for snapd before running these commands? Snapd should at some point time out on the change IIRC (I think it's like 10 minutes in this case if a service that is trying to be started is broken), and you can also abort changes manually.