Please help testing 2.32 in beta

We have the 2.32 release coming very hot, with several important changes that we want to land soon. If you have a chance, please test this release out.

For that if you are in a distribution that is able to re-execute snapd from core (Ubuntu is one of them), just refresh the core snap from the beta channel:

$ sudo snap refresh --channel=beta core

Then let us know if you have any issues in the coming days.

1 Like
$ sudo snap refresh --channel=beta core
2018/03/27 14:30:27.014868 cmd.go:212: DEBUG: restarting into "/snap/core/current/usr/bin/snap"
2018-03-27T14:30:41Z ERROR skipping security profiles setup for snap "freechessclub" when handling snap "core": no state entry for key
2018-03-27T14:30:42Z ERROR skipping security profiles setup for snap "riot-web" when handling snap "core": no state entry for key
2018-03-27T14:31:01Z ERROR skipping security profiles setup for snap "freechessclub" when handling snap "core": no state entry for key
2018-03-27T14:31:02Z ERROR skipping security profiles setup for snap "riot-web" when handling snap "core": no state entry for key
core (beta) 16-2.32.1 from 'canonical' refreshed

This error message could use some tweaking. As written I have no idea what it means.

@evan True, thanks for reporting.

@zyga-snapd @pstolowski What’s going on here? These messages shouldn’t even be there in the first place.

Hmmm, looks like a bad blast from the past. I don’t know what the issue is yet. @evan can you share some more information with us, perhaps a copy of your state.json (in private).

@evan Can you share your state.json (PM me)?

I had a similar issue:

$ sudo snap refresh --channel=beta core
2018-03-27T09:49:06-05:00 ERROR skipping security profiles setup for snap
"dotnet-sdk" when handling snap "core": no state entry for key
2018-03-27T09:49:14-05:00 INFO Waiting for restart...
2018-03-27T09:49:33-05:00 ERROR skipping security profiles setup for snap
"dotnet-sdk" when handling snap "core": no state entry for key
core (beta) 16-2.32.1 from 'canonical' refreshed

What is weird is that I don’t even have dotnet-sdk installed:

$ snap list|grep dotnet
$ ls -l /var/lib/snapd/snaps/*dotnet*
ls: cannot access '/var/lib/snapd/snaps/*dotnet*': No such file or directory

(I did at some point in the past though)

That might be a great hint of why the error is surfacing.

Ok, so first diagnosis based on Jamie’s state: the problem is we have stray connections for a removed snap in the state; these were auto-connections from the snap to core, so we consider that snap affected by core upgrade. Now i need to find out why we didn’t remove these connections when snap was removed.

UPDATE: the state I got from Evan has same issue.

Followup to my earlier diagnosis (stray connections, see above).

Our snap removal code looks good, connections are discarded from the state as they should (I also verified that by removing some snaps with connections on stable, then refreshing to beta and couldn’t reproduce).

The only explanation I can think of right now is that one of the tasks executed as part of snap removal failed in the past, so we didn’t execute “discard-conns” task, and since we don’t have undo for snap remove failures, the snap was gone with connections still in the state. It’s impossible to tell what failed as there is no evidence of that anymore in the state. And it’s curious why we didn’t see that error message before…

I think we didn’t see the error before with older versions of snapd, because the change that makes these stray connections “surface” was made in January: reloadConnections code doesn’t reject such bad connections now, it logs a ‘Notice’ and the connections are still considered further in the code (leading to the above error).

1 Like

Will we continue to see these issues going forward with future core refreshes or did this refresh discard the problematic connections?

We discussed this and agreed to not discard the stale connections yet (we can do that in 2.33) but not surface the error either.

PR: https://github.com/snapcore/snapd/pull/4946

As discussed, a fix for removing of stale connections will be proposed separately.

2 Likes

Thank you! I will do a small tweak to that PR and we can merge it soon. I will be in 2.32.2

2 Likes