package update causes all other snap package mounts to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am experiencing an issue where whenever there is an update for a snap package, all other snap packages lose their mounts and all snaps that were not updated become broken. This is a reproducible issue on multiple servers running CloudLinux, however, CloudLinux claims it is a snapd issue and not a CloudLinux issue, despite my inability to reproduce the issue on servers not running CloudLinux.
Symptoms:
Before upgrade all mounts show with df -h:
[root@cl ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 9.5M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/vda3 48G 12G 34G 25% /
/dev/loop0 111M 111M 0 100% /var/lib/
/dev/loop2 62M 62M 0 100% /var/lib/
/dev/loop3 62M 62M 0 100% /var/lib/
/dev/loop1 44M 44M 0 100% /var/lib/
tmpfs 384M 0 384M 0% /run/user/0
To manually trigger the issue, I revert the core20 package to a previous revision using "snap revert core20 --revision 1328". I then remove the newer core20 snap with "snap remove core20 --revision 1361". Then I simply run "snap refresh core20" to grab the new revision of core20 again. After doing so, the only mount still mounted is for the new core package:
[root@cl ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 9.5M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/vda3 48G 12G 34G 25% /
tmpfs 384M 0 384M 0% /run/user/0
/dev/loop3 62M 62M 0 100% /var/lib/
/var/log/messages complains around this time of issues with being unable to find core20, core, and certbot revisions:
Feb 23 16:32:03 cl systemd: Reloading.
Feb 23 16:32:03 cl systemd: [/usr/lib/
Feb 23 16:32:03 cl systemd: [/usr/lib/
Feb 23 16:32:03 cl systemd: Configuration file /usr/lib/
Feb 23 16:32:03 cl systemd: Reloading.
Feb 23 16:32:03 cl kernel: Firewall: *UDP_IN Blocked* IN=eth0 OUT= MAC=ff:
Feb 23 16:32:03 cl systemd: [/usr/lib/
Feb 23 16:32:03 cl systemd: [/usr/lib/
Feb 23 16:32:03 cl systemd: Configuration file /usr/lib/
Feb 23 16:32:03 cl systemd: var-lib-
Feb 23 16:32:03 cl systemd: Mounting Ensure that the snap directory shares mount events....
Feb 23 16:32:03 cl systemd: Mounted Ensure that the snap directory shares mount events..
Feb 23 16:32:03 cl systemd: Mounting Mount unit for core20, revision 1361...
Feb 23 16:32:03 cl systemd: Mounted Mount unit for core20, revision 1361.
Feb 23 16:32:03 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:03 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:03 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:03 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:04 cl snapd: link.go:133: cannot update fontconfig cache: cannot get fc-cache-v6 from core: open /var/lib/
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "core20" at revision 1328: cannot find installed snap "core20" at revision 1328: missing file /var/lib/
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "certbot" at revision 1788: cannot find installed snap "certbot" at revision 1788: missing file /var/lib/
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "core" at revision 12725: cannot find installed snap "core" at revision 12725: missing file /var/lib/
Feb 23 16:32:04 cl snapd: storehelpers.
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "certbot" at revision 1788: cannot find installed snap "certbot" at revision 1788: missing file /var/lib/
Feb 23 16:32:04 cl snapd: snapmgr.go:327: cannot read snap info of snap "core" at revision 12725: cannot find installed snap "core" at revision 12725: missing file /var/lib/
And due to the missing mounts all snaps (except the one that just updated) are broken:
[root@cl ~]# snap list
Name Version Rev Tracking Publisher Notes
certbot - 1788 latest/stable certbot-eff✓ broken
core - 12725 latest/stable canonical✓ broken
core20 20220215 1361 latest/stable canonical✓ base
Rebooting the system restores all mounts, but that's not a possibilities every time this issue occurs. As I mentioned, this issue is reproducible at will, so if there is any other information you need, please let me know.
Please attach contents of /etc/os-release and the journal (system one) from the time period where this happens (eg. sudo journalctl --since 2022-02-23 --no-pager).