Snapd not responding

So my device (DELL Edge 3001) stopped responding all of a sudden and after a couple of reboots I was able to get in to the system. I checked if there are any core updates that happened which might have caused some issues. The snap changes showed a huge number of entries with the description Connect ccm-wda:cloud-led to caracalla:cloud-led and Connect ccm-wda:sku-bit-a/b/c to caracalla:sku-bit-a/b/c. There was no info when I ran snap tasks <change-id> . Trying to view logs for both ccd-wda and caracalla just hung and I had to kill the commands with ctrl+C. After this no snap commands works and all appears to be struck in some kind of deadlock.
I am not sure if this is a snapd issue or something to do with dell snap. But I am posting here just in case somebody has any clue on what might be going on and why snapd is not responding.

Complete log here

2542  Done    yesterday at 20:12 IST    yesterday at 20:12 IST    Running service command
2543  Done    yesterday at 20:19 IST    yesterday at 20:19 IST    Connect ccm-wda:cloud-led to caracalla:cloud-led
2544  Done    yesterday at 20:19 IST    yesterday at 20:19 IST    Connect ccm-wda:sku-bit-a to caracalla:sku-bit-a
2545  Done    yesterday at 20:19 IST    yesterday at 20:19 IST    Connect ccm-wda:sku-bit-b to caracalla:sku-bit-b
2546  Done    yesterday at 20:19 IST    yesterday at 20:19 IST    Connect ccm-wda:sku-bit-c to caracalla:sku-bit-c
:
:
:
: 
2879  Done    today at 09:22 IST        today at 09:22 IST        Connect ccm-wda:cloud-led to caracalla:cloud-led
2880  Done    today at 09:22 IST        today at 09:22 IST        Connect ccm-wda:sku-bit-a to caracalla:sku-bit-a
2881  Done    today at 09:22 IST        today at 09:22 IST        Connect ccm-wda:sku-bit-b to caracalla:sku-bit-b
2882  Done    today at 09:22 IST        today at 09:22 IST        Connect ccm-wda:sku-bit-c to caracalla:sku-bit-c

admin@machine:~$ sudo snap tassk 2543
error: unknown command "tassk", see 'snap help'
admin@machine:~$ sudo snap tasks 2543
Status  Spawn  Ready  Summary

admin@machine:~$ sudo snap tasks 2882
Status  Spawn  Ready  Summary

admin@machine:~$ sudo snap refresh --time
timer: mon2,11:17
last: 10 days ago, at 13:05 IST
next: in 31 days, at 11:17 IST
admin@machine:~$ snap logs ccm-wda
^C
admin@machine:~$ snap logs caracalla
admin@machine:~$
admin@machine:~$ snap list
^C^C

Some more updates, looks like the system is in some reboot cycle. The little span in which I was able to login and run last reboot showed another huge entry for reboots and uptime showed like up for 5 mins.

Thanks for this problem report and sorry for the trouble with the device. The log interessting - could you also please capture the output of “sudo journalctl -u snapd” - this may give us additional hints what is going wrong.

$ sudo journalctl -u snapd
-- Logs begin at Thu 2018-10-11 20:09:44 IST, end at Fri 2018-10-12 13:39:34 IST. --
Oct 11 20:16:49 machine systemd[1]: Starting Snappy daemon...
Oct 11 20:16:50 machine snapd[1985]: AppArmor status: apparmor is enabled and all features are available
Oct 11 20:16:51 machine snapd[1985]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 20:16:51 machine systemd[1]: Started Snappy daemon.
Oct 11 20:17:33 machine snapd[1985]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 20:23:58 machine systemd[1]: Starting Snappy daemon...
Oct 11 20:23:59 machine snapd[2026]: AppArmor status: apparmor is enabled and all features are available
Oct 11 20:24:00 machine snapd[2026]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 20:24:00 machine systemd[1]: Started Snappy daemon.
Oct 11 20:24:43 machine snapd[2026]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 20:31:47 machine systemd[1]: Starting Snappy daemon...
Oct 11 20:31:49 machine snapd[2016]: AppArmor status: apparmor is enabled and all features are available
Oct 11 20:31:50 machine snapd[2016]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 20:31:50 machine systemd[1]: Started Snappy daemon.
Oct 11 20:32:32 machine snapd[2016]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 20:40:03 machine systemd[1]: Starting Snappy daemon...
Oct 11 20:40:05 machine snapd[2011]: AppArmor status: apparmor is enabled and all features are available
Oct 11 20:40:06 machine snapd[2011]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 20:40:06 machine systemd[1]: Started Snappy daemon.
Oct 11 20:40:48 machine snapd[2011]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 20:56:31 machine systemd[1]: Starting Snappy daemon...
Oct 11 20:56:32 machine snapd[1998]: AppArmor status: apparmor is enabled and all features are available
Oct 11 20:56:33 machine snapd[1998]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 20:56:33 machine systemd[1]: Started Snappy daemon.
Oct 11 20:57:16 machine snapd[1998]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:04:16 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:04:18 machine snapd[2010]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:04:19 machine snapd[2010]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:04:19 machine systemd[1]: Started Snappy daemon.
Oct 11 21:05:02 machine snapd[2010]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:12:15 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:12:16 machine snapd[2015]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:12:17 machine snapd[2015]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:12:17 machine systemd[1]: Started Snappy daemon.
Oct 11 21:13:00 machine snapd[2015]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:20:18 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:20:20 machine snapd[2020]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:20:21 machine snapd[2020]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:20:21 machine systemd[1]: Started Snappy daemon.
Oct 11 21:21:03 machine snapd[2020]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:28:20 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:28:22 machine snapd[2015]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:28:23 machine snapd[2015]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:28:23 machine systemd[1]: Started Snappy daemon.
Oct 11 21:29:06 machine snapd[2015]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:35:51 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:35:52 machine snapd[2026]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:35:53 machine snapd[2026]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:35:53 machine systemd[1]: Started Snappy daemon.
Oct 11 21:36:36 machine snapd[2026]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 21:43:51 machine systemd[1]: Starting Snappy daemon...
Oct 11 21:43:52 machine snapd[2003]: AppArmor status: apparmor is enabled and all features are available
Oct 11 21:43:53 machine snapd[2003]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 21:43:53 machine systemd[1]: Started Snappy daemon.
Oct 11 21:44:36 machine snapd[2003]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 22:03:24 machine systemd[1]: Starting Snappy daemon...
Oct 11 22:03:26 machine snapd[2041]: AppArmor status: apparmor is enabled and all features are available
Oct 11 22:03:27 machine snapd[2041]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 22:03:27 machine systemd[1]: Started Snappy daemon.
Oct 11 22:04:10 machine snapd[2041]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 22:11:29 machine systemd[1]: Starting Snappy daemon...
Oct 11 22:11:31 machine snapd[2022]: AppArmor status: apparmor is enabled and all features are available
Oct 11 22:11:32 machine snapd[2022]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 22:11:32 machine systemd[1]: Started Snappy daemon.
Oct 11 22:12:15 machine snapd[2022]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --
Oct 11 22:19:16 machine systemd[1]: Starting Snappy daemon...
Oct 11 22:19:17 machine snapd[2024]: AppArmor status: apparmor is enabled and all features are available
Oct 11 22:19:18 machine snapd[2024]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 11 22:19:18 machine systemd[1]: Started Snappy daemon.
Oct 11 22:20:01 machine snapd[2024]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/ht
-- Reboot --

Can you try with journalctl -u snapd --no-pager ?

$ sudo journalctl -u snapd --no-pager
-- Logs begin at Thu 2018-10-11 20:16:34 IST, end at Fri 2018-10-12 14:17:19 IST. --
-- Reboot --
Oct 12 08:14:54 machine systemd[1]: Starting Snappy daemon...
Oct 12 08:14:55 machine snapd[2013]: AppArmor status: apparmor is enabled and all features are available
Oct 12 08:14:56 machine snapd[2013]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 08:14:56 machine systemd[1]: Started Snappy daemon.
Oct 12 08:15:39 machine snapd[2013]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 08:41:14 machine systemd[1]: Starting Snappy daemon...
Oct 12 08:41:15 machine snapd[2009]: AppArmor status: apparmor is enabled and all features are available
Oct 12 08:41:16 machine snapd[2009]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 08:41:16 machine systemd[1]: Started Snappy daemon.
Oct 12 08:41:59 machine snapd[2009]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 08:48:56 machine systemd[1]: Starting Snappy daemon...
Oct 12 08:48:57 machine snapd[2013]: AppArmor status: apparmor is enabled and all features are available
Oct 12 08:48:58 machine snapd[2013]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 08:48:58 machine systemd[1]: Started Snappy daemon.
Oct 12 08:49:41 machine snapd[2013]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 08:56:56 machine systemd[1]: Starting Snappy daemon...
Oct 12 08:56:57 machine snapd[2033]: AppArmor status: apparmor is enabled and all features are available
Oct 12 08:56:58 machine snapd[2033]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 08:56:58 machine systemd[1]: Started Snappy daemon.
Oct 12 08:57:41 machine snapd[2033]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 09:10:50 machine systemd[1]: Starting Snappy daemon...
Oct 12 09:10:52 machine snapd[2032]: AppArmor status: apparmor is enabled and all features are available
Oct 12 09:10:53 machine snapd[2032]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 09:10:53 machine systemd[1]: Started Snappy daemon.
Oct 12 09:11:35 machine snapd[2032]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 09:19:49 machine systemd[1]: Starting Snappy daemon...
Oct 12 09:19:51 machine snapd[2017]: AppArmor status: apparmor is enabled and all features are available
Oct 12 09:19:52 machine snapd[2017]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 09:19:52 machine systemd[1]: Started Snappy daemon.
Oct 12 09:20:34 machine snapd[2017]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 09:38:39 machine systemd[1]: Starting Snappy daemon...
Oct 12 09:38:40 machine snapd[2021]: AppArmor status: apparmor is enabled and all features are available
Oct 12 09:38:41 machine snapd[2021]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 09:38:41 machine systemd[1]: Started Snappy daemon.
Oct 12 09:39:23 machine snapd[2021]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 09:46:53 machine systemd[1]: Starting Snappy daemon...
Oct 12 09:46:54 machine snapd[1999]: AppArmor status: apparmor is enabled and all features are available
Oct 12 09:46:55 machine snapd[1999]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 09:46:55 machine systemd[1]: Started Snappy daemon.
Oct 12 09:47:39 machine snapd[1999]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 09:54:33 machine systemd[1]: Starting Snappy daemon...
Oct 12 09:54:35 machine snapd[2015]: AppArmor status: apparmor is enabled and all features are available
Oct 12 09:54:36 machine snapd[2015]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 09:54:36 machine systemd[1]: Started Snappy daemon.
Oct 12 09:55:18 machine snapd[2015]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 10:01:46 machine systemd[1]: Starting Snappy daemon...
Oct 12 10:01:48 machine snapd[2025]: AppArmor status: apparmor is enabled and all features are available
Oct 12 10:01:49 machine snapd[2025]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 10:01:49 machine systemd[1]: Started Snappy daemon.
Oct 12 10:02:32 machine snapd[2025]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 11:04:29 machine systemd[1]: Starting Snappy daemon...
Oct 12 11:04:31 machine snapd[2009]: AppArmor status: apparmor is enabled and all features are available
Oct 12 11:04:32 machine snapd[2009]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 11:04:32 machine systemd[1]: Started Snappy daemon.
Oct 12 11:05:14 machine snapd[2009]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 11:11:43 machine systemd[1]: Starting Snappy daemon...
Oct 12 11:11:44 machine snapd[2027]: AppArmor status: apparmor is enabled and all features are available
Oct 12 11:11:45 machine snapd[2027]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 11:11:45 machine systemd[1]: Started Snappy daemon.
Oct 12 11:12:28 machine snapd[2027]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 11:19:50 machine systemd[1]: Starting Snappy daemon...
Oct 12 11:19:51 machine snapd[2023]: AppArmor status: apparmor is enabled and all features are available
Oct 12 11:19:52 machine snapd[2023]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 11:19:52 machine systemd[1]: Started Snappy daemon.
Oct 12 11:20:35 machine snapd[2023]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 11:22:32 machine systemd[1]: Starting Snappy daemon...
Oct 12 11:22:34 machine snapd[2012]: AppArmor status: apparmor is enabled and all features are available
Oct 12 11:22:35 machine snapd[2012]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 11:22:35 machine systemd[1]: Started Snappy daemon.
Oct 12 11:23:17 machine snapd[2012]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Oct 12 11:46:10 machine snapd[2012]: handlers.go:389: Reported install problem for "service-x" as 4e8ca36a-cde6-11e8-93c0-fa163ee63de6 OOPSID
-- Reboot --
Oct 12 12:48:13 machine systemd[1]: Starting Snappy daemon...
Oct 12 12:48:14 machine snapd[1988]: AppArmor status: apparmor is enabled and all features are available
Oct 12 12:48:15 machine snapd[1988]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 12:48:15 machine systemd[1]: Started Snappy daemon.
Oct 12 12:48:57 machine snapd[1988]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 13:02:14 machine systemd[1]: Starting Snappy daemon...
Oct 12 13:02:15 machine snapd[2040]: AppArmor status: apparmor is enabled and all features are available
Oct 12 13:02:16 machine snapd[2040]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 13:02:16 machine systemd[1]: Started Snappy daemon.
Oct 12 13:02:58 machine snapd[2040]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
-- Reboot --
Oct 12 13:35:57 machine systemd[1]: Starting Snappy daemon...
Oct 12 13:35:58 machine snapd[2002]: AppArmor status: apparmor is enabled and all features are available
Oct 12 13:35:59 machine snapd[2002]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 13:35:59 machine systemd[1]: Started Snappy daemon.
Oct 12 13:36:41 machine snapd[2002]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Oct 12 13:43:15 machine snapd[2002]: storehelpers.go:398: cannot refresh: snap has no updates available: "alsa-utils", "bluez", "caracalla", "caracalla-kernel", "ccm-wda", "core", "dcc", "dcm", "http", "locationd", "network-manager", "snappy-debug", "snapweb", "tpm2", "udisks2", "uefi-fw-tools", "wifi-ap", "wpa-supplicant"
-- Reboot --
Oct 12 14:14:31 machine systemd[1]: Starting Snappy daemon...
Oct 12 14:14:32 machine snapd[2040]: AppArmor status: apparmor is enabled and all features are available
Oct 12 14:14:33 machine snapd[2040]: daemon.go:344: started snapd/2.35.2 (series 16) ubuntu-core/16 (amd64) linux/4.4.0-135-generic.
Oct 12 14:14:33 machine systemd[1]: Started Snappy daemon.
Oct 12 14:15:16 machine snapd[2040]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Complete logs here

Just in case required

$ snap version
snap    2.35.2
snapd   2.35.2
series  16
kernel  4.4.0-135-generic

Also from the logs I notice that snapd tried to refresh or find update for fre snaps , though my refresh schedule is like a month away. Is this normal?

Oct 12 13:36:41 machine snapd[2002]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Oct 12 13:43:15 FT8TB02 snapd[2002]: storehelpers.go:398: cannot refresh: snap has no updates available: "alsa-utils", "bluez", "caracalla", "caracalla-kernel", "ccm-wda", "core", "dcc", "dcm", "http", "locationd", "network-manager", "snappy-debug", "snapweb", "tpm2", "udisks2", "uefi-fw-tools", "wifi-ap", "wpa-supplicant"
$ snap refresh --time
timer: mon2,11:17
last: 10 days ago, at 13:05 IST
next: in 31 days, at 11:17 IST

Can you add this file?

$ cat /etc/systemd/system/snapd.service.d/override.conf
[Service]
Environment=SNAPD_DEBUG=1

And also provide output of grub-editenv list.

$  grub-editenv list
snap_mode=
snap_try_core=
snap_try_kernel=
snap_kernel=caracalla-kernel_96.snap
snap_core=core_5548.snap

There is no such service under /etc/systemd/system/ , I haved added the SNAPD_DEBUG= to /etc/environment . That should be fine right ?

yes, you might see some debug out on the terminal with that though.

Thanks, will update after the next reboot. Just a heads-up, It looks like there is an issue with one of the internal snaps that might be causing the reboots . Will update with more info once we get clear picture.

Right, the first thing to check is indeed finding out what is indeed issuing the reboots, and for what reason. All these logs show is that something is rebooting the system while snapd is trying to run.

So here is the latest logs till the last reboot.

https://paste.ubuntu.com/p/JdyWs6sct4/

It is still unknown why there is so many reboots. Just in case if you happen to find anything from the snapd logs, do update.

I doubt if its an issue with snapd, we have ruled out that chance 90% . Would be great If somebody can clarify on this question .

Also from the logs I notice that snapd tried to refresh or find update for fre snaps , though my refresh schedule is like a month away. Is this normal?

Oct 12 13:36:41 machine snapd[2002]: stateengine.go:102: state ensure error: Get https://api.snapcraft.io/api/v1/snaps/sections: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Oct 12 13:43:15 FT8TB02 snapd[2002]: storehelpers.go:398: cannot refresh: snap has no updates available: “alsa-utils”, “bluez”, “caracalla”, “caracalla-kernel”, “ccm-wda”, “core”, “dcc”, “dcm”, “http”, “locationd”, “network-manager”, “snappy-debug”, “snapweb”, “tpm2”, “udisks2”, “uefi-fw-tools”, “wifi-ap”, “wpa-supplicant”
$ snap refresh --time
timer: mon2,11:17
last: 10 days ago, at 13:05 IST
next: in 31 days, at 11:17 IST

Thanks for the quick response and sorry for the false alarm.

about the refresh, that’s probably not a snapd-started auto-refresh, but a refresh started by the the dell management snap (I forget which of the three-letter snaps it was). You can check by looking at snap changes: one will say “Refresh”, the other, “Auto-refresh”.