Some small advice unrelated to the bug (I hope). In the log I attached above you can see where snapd creates "writable mimic" when it prints "create-writable-mimic" with a path. This entry is interesting:
utils.go:456: DEBUG: create-writable-mimic "/snap/microk8s/x1/var/lib"
The snap needs a writable mimic in $SNAP/var/lib/snapd/lib/gl - you can avoid that by putting a layout entry that mounts a tmpfs there explicitly.
layout: $SNAP/var/lib/snapd/lib/gl: type: tmpfs
In addition, ship $SNAP/va/rlib/snapd/lib/gl as an empty mount point in your snap, this will save a lot of redundant operations.
Some small advice unrelated to the bug (I hope). In the log I attached above you can see where snapd creates "writable mimic" when it prints "create- writable- mimic" with a path. This entry is interesting:
utils.go:456: DEBUG: create- writable- mimic "/snap/ microk8s/ x1/var/ lib"
The snap needs a writable mimic in $SNAP/var/ lib/snapd/ lib/gl - you can avoid that by putting a layout entry that mounts a tmpfs there explicitly.
layout: var/lib/ snapd/lib/ gl:
$SNAP/
type: tmpfs
In addition, ship $SNAP/va/ rlib/snapd/ lib/gl as an empty mount point in your snap, this will save a lot of redundant operations.