Snapd.service delays startup in Ubuntu 18.04 with 4.15.0-24


#21

just for completeness, this is

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1780062


#22

I’ve got the same issue.
systemd-analyze blame shows 1min 24.186s snapd.service

Thanks mvo for the temporary fix. I just booted to grub, selected an old kernel, and sure enough, fast boot time!
Fast settings below:

jayshomebrew@ubuntu:~$ apt list snapd
Listing... Done
snapd/bionic-updates,now 2.32.9+18.04 amd64 [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
jayshomebrew@ubuntu:~$ 
jayshomebrew@ubuntu:~$ systemd-detect-virt 
none
jayshomebrew@ubuntu:~$ uname -r
4.15.0-23-generic
jayshomebrew@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04 LTS
Release:	18.04
Codename:	bionic
jayshomebrew@ubuntu:~$ snap version
snap    2.33.1
snapd   2.33.1
series  16
ubuntu  18.04
kernel  4.15.0-23-generic


#23

Still seem to be getting the same issue.

tim@TimGJ:~$ sudo systemd-analyze blame
1min 49.280s snapd.seeded.service
     18.778s snapd.service
      7.026s NetworkManager-wait-online.service
      1.212s mariadb.service
       762ms fwupd.service
       747ms dev-sda1.device
       503ms dev-loop0.device
       493ms dev-loop3.device
       490ms dev-loop1.device
       487ms dev-loop2.device
       471ms dev-loop4.device
       468ms dev-loop7.device
       459ms dev-loop5.device
       459ms dev-loop6.device
       442ms dev-loop8.device
       431ms dev-loop9.device
       430ms dev-loop11.device
       430ms dev-loop10.device
       425ms dev-loop12.device
       418ms dev-loop14.device
       417ms dev-loop13.device
       401ms dev-loop15.device
       397ms dev-loop16.device
tim@TimGJ:~$ apt list snapd
Listing... Done
snapd/bionic-updates,now 2.32.9+18.04 amd64 [installed]
N: There is 1 additional version. Please use the '-a' switch to see it
tim@TimGJ:~$ snap version
snap    2.33.1
snapd   2.33.1
series  16
ubuntu  18.04
kernel  4.15.0-24-generic
tim@TimGJ:~$ systemd-detect-virt 
none

#24

My father reported this issue on Friday, and three of my test systems fell ill on Monday & Tuesday. I can confirm 2.33.1+18.04ubuntu2 is not working, nor is the old 2.32.5.

I was only able to solve this problem by either configuring grub to boot revision 23 of the kernel, or by subscribing to the preview channel and upgrading to kernel 4.15.0.26

Hardware seems to play a role. I was able to boot my father’s Ubuntu on my coffeelake system without problem or delay. Coffeelake, skylake and apollo lake are all immune, while braswell and haswell are affected.

I am not sure this is a fault of snapd or something peculiar to revision 24 of the kernel


#25

In my case, Alt+F2 brings me to the login screen.


#26

Try Alt+F2 when it’s stuck on loading.


#27

I reinstalled about a week ago before there was more debugging information available. Then the same thing happened to my wife’s laptop last night. Blocking on reading the random device reminded me of another problem that I had on startup of Ubiquity’s Unifi controller.

Installing haveged:

apt-get install haveged

Made my wife’s laptop boot very quickly. I believe that the problem is the random pool doesn’t have enough entropy at boot and the software reads from from random, not urandom which stirs the pool.


#28

Using the shift key works. It didn’t hold the boot and join in X.

➜  ~ apt list snapd   
snapd/bionic-updates,now 2.32.9+18.04 amd64 [installed]
➜  ~ snap version
snap    2.33.1
snapd   2.33.1
series  16
ubuntu  18.04
kernel  4.15.0-24-generic
➜  ~ systemd-detect-virt 
none
➜  ~ uname -r
4.15.0-24-generic