I was surprised to see this fail since the snap from /tmp/test-snapd-sh is bind-mounted to /snap/test-snapd-sh/x1. Yet at runtime this happens:
zyga@fyke:~$ SNAPD_DEBUG=1 test-snapd-sh [snip, unrelated stuff] DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...) DEBUG: argv[1] = test-snapd-sh cannot snap-exec: cannot read info for "test-snapd-sh": cannot find installed snap "test-snapd-sh" at revision x1: missing file /var/lib/snapd/snaps/test-snapd-sh_x1.snap zyga@fyke:~$ ls -ld /var/lib/snapd/snaps/test-snapd-sh_x1.snap lrwxrwxrwx 1 root root 18 Oct 25 20:49 /var/lib/snapd/snaps/test-snapd-sh_x1.snap -> /tmp/test-snapd-sh
So the snap "file" in /var/lib/snapd/snaps is a symbolic link. Why is it being looked at by snap-exec? No idea yet, checking.
I was surprised to see this fail since the snap from /tmp/test-snapd-sh is bind-mounted to /snap/test- snapd-sh/ x1. Yet at runtime this happens:
zyga@fyke:~$ SNAPD_DEBUG=1 test-snapd-sh usr/lib/ snapd/snap- exec, /usr/lib/ snapd/snap- exec... ) snapd/snaps/ test-snapd- sh_x1.snap snapd/snaps/ test-snapd- sh_x1.snap snapd/snaps/ test-snapd- sh_x1.snap -> /tmp/test-snapd-sh
[snip, unrelated stuff]
DEBUG: execv(/
DEBUG: argv[1] = test-snapd-sh
cannot snap-exec: cannot read info for "test-snapd-sh": cannot find installed snap "test-snapd-sh" at revision x1: missing file /var/lib/
zyga@fyke:~$ ls -ld /var/lib/
lrwxrwxrwx 1 root root 18 Oct 25 20:49 /var/lib/
So the snap "file" in /var/lib/ snapd/snaps is a symbolic link. Why is it being looked at by snap-exec? No idea yet, checking.