Snap does not start after reboot

In that case the trigger is more complex and may involve an application holding a reference to an open file (e.g. a library). I will expand my test and see what I can get.

It seems like a different case because of the EBUSY error that is returned from the kernel.

I managed to reproduce the issue and I am investigating the details now.

EDIT: This is the log from a failed installation. I will attempt to reduce the number of layout entries to get the minimal reproducer.

The actual error is on remove of the directory:

2019/09/19 12:03:01.191050 change.go:329: DEBUG: THIS IS THE PATCHED COPY
2019/09/19 12:03:01.191067 change.go:341: DEBUG: mount --make-rprivate "/usr/lib/x86_64-linux-gnu/wpe-webkit-1.0" (error: <nil>)
2019/09/19 12:03:01.191133 change.go:347: DEBUG: umount "/usr/lib/x86_64-linux-gnu/wpe-webkit-1.0" (error: <nil>)
2019/09/19 12:03:01.191200 change.go:358: DEBUG: openPath "/usr/lib/x86_64-linux-gnu/wpe-webkit-1.0" (error: <nil>)
2019/09/19 12:03:01.191219 change.go:367: DEBUG: fstatfs 11 (error: <nil>)
2019/09/19 12:03:01.191283 change.go:393: DEBUG: remove "/usr/lib/x86_64-linux-gnu/wpe-webkit-1.0" (error: remove /usr/lib/x86_64-linux-gnu/wpe-webkit-1.0: device or resource busy)

The directory that failed to unmount is a self-mount-point:

root@x240:/# cat /proc/self/mountinfo  | grep /usr/lib/x86_64-linux-gnu/wpe-webkit-1.0
707 708 7:16 /usr/lib/x86_64-linux-gnu/wpe-webkit-1.0 /usr/lib/x86_64-linux-gnu/wpe-webkit-1.0 ro,nodev,relatime master:361 - squashfs /dev/loop16 ro

I’m looking at untangling this state now. It may be a composition of two separate errors.

I kind of feel this is related to

could the fix from this bug be related?

It is in the same area but this is a different issue. The one here is caused by a mimic constructed underneath another mimic.