I think I've broken snapd (on my system)

This seems to have originated with me entering the command:

snapcraft snap install --dangerous --classic *.snap

When I had both amd64 and all builds of a local test snap. The command never (20min or so) terminated. And commands such as snap list and snap changes stopped responding.

If I restart the snapd daemon (systemctl restart snapd) then snap changes responds slowly at first:

$ snap changes
ID    Status   Spawn                   Ready                   Summary
...
4742  Done     yesterday at 16:24 BST  yesterday at 16:24 BST  Remove "frame-it" snap
4743  Done     yesterday at 16:24 BST  yesterday at 16:24 BST  Remove "frame-it_test" snap
4744  Done     yesterday at 17:10 BST  yesterday at 17:10 BST  Install "frame-it" snap from file "CLionProjects/frame-it/frame-it_0.1_amd64.snap"
4745  Undoing  yesterday at 20:48 BST  -                       Install snaps "frame-it", "frame-it" from files "frame-it_0.1_all.snap", "frame-it_0.1_amd64.snap"
4746  Doing    yesterday at 22:32 BST  -                       Running service command for snap "mir-kiosk-scummvm"
4747  Doing    yesterday at 22:32 BST  -                       Running service command for snap "mir-kiosk-neverputt"
4748  Doing    yesterday at 22:32 BST  -                       Running service command for snap "wpe-webkit-mir-kiosk"
4749  Doing    yesterday at 22:32 BST  -                       Running service command for snap "mir-kiosk-apps"
4750  Doing    yesterday at 22:32 BST  -                       Running service command for snap "mircade"

But it soon stops responding.

$ systemctl restart snapd && snap version
snap    2.56
snapd   2.56
series  16
ubuntu  20.04
kernel  5.13.0-51-generic

Any suggestions?

I went spelunking around /var/lib/snapd removing references to “frame-it” (files with it in the name and an entry in /var/lib/snapd/state.json).

systemctl stop snapd
sudo rm /var/lib/snapd/sequence/frame-it*.json
sudo grep frame-it -lR /var/lib/snapd
sudoedit /var/lib/snapd/state.json
systemctl start snapd

After which snapd started acting normally:

4744  Done    yesterday at 17:10 BST  yesterday at 17:10 BST  Install "frame-it" snap from file "CLionProjects/frame-it/frame-it_0.1_amd64.snap"
4745  Error   yesterday at 20:48 BST  today at 16:03 BST      Install snaps "frame-it", "frame-it" from files "frame-it_0.1_all.snap", "frame-it_0.1_amd64.snap"
4746  Done    yesterday at 22:32 BST  today at 16:03 BST      Running service command for snap "mir-kiosk-scummvm"
4747  Done    yesterday at 22:32 BST  today at 16:03 BST      Running service command for snap "mir-kiosk-neverputt"
4748  Done    yesterday at 22:32 BST  today at 16:03 BST      Running service command for snap "wpe-webkit-mir-kiosk"
4749  Done    yesterday at 22:32 BST  today at 16:03 BST      Running service command for snap "mir-kiosk-apps"
4750  Done    yesterday at 22:32 BST  today at 16:03 BST      Running service command for snap "mircade"
4751  Done    today at 12:10 BST      today at 16:03 BST      Auto-refresh snap "lxd"