Snap doesn't work with kernel 6.8

Hi, sorry for bringing this up again, but I’m wondering why snap doesn’t work with kernel 6.8.
I’ve looked at previous threads and also I looked into the snapd code, and it does the mount correctly.

I get an error the same as everyone else:

/tmp >>> LANG=C sudo mount -t squashfs /tmp/canary.squashfs /tmp/tmp.Q2XMX5UkOa                        [32]
mount: /tmp/tmp.Q2XMX5UkOa: /dev/loop51 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.

For me it seems like the problem is not in snapd, but in the kernel, because as you see I cannot mount squashfs at all myself (but other sqash files are mounted at this moment).
Look at this discrepancy:

/tmp >>> ls -lah /dev/loop51                                                                               
brw-rw---- 1 root disk 7, 51 04-18 18:22 /dev/loop51
~ >>> LANG=C sudo losetup /dev/loop51                                                                   [1]
losetup: /dev/loop51: No such file or directory

It’s like something is broken and loop device is and isn’t there depending on who you ask.

I’m on current stable: 6.8.5-1-MANJARO

I tried removing the loop device:

~ >>> LANG=C sudo losetup -d /dev/loop51                                                                [1]
losetup: /dev/loop51: detach failed: No such device or address
~ >>> sudo rm -f /dev/loop51
~ >>> LANG=C ls -lah /dev/loop51                                                                        [2]
ls: cannot access '/dev/loop51': No such file or directory
/tmp >>> LANG=C sudo mount -t squashfs /tmp/canary.squashfs /tmp/tmp.Q2XMX5UkOa                            
mount: /tmp/tmp.Q2XMX5UkOa: failed to setup loop device for /tmp/canary.squashfs.

You are not the first to discover this.
Using another supported kernel seems to be the easiest way around this - unless you really do need the newest kernel.

Yea I know, I just wanted to share my finding that the problem is not in snap, and might not be limited to snap after all. I just wanted to help, maybe someone knows how to fix it in the kernel.

At this broken stage anything that tries to use the loop devices would be affected, because losetup reports that /dev/loop51 is free to use, but a phantom device with that name already exists.

The kernel version 6.8 seems to behave … awkwardly … in a few areas, not just regarding snaps.

I have not yet looked at Arch or EOS and whether they encounter the same type of problems as some people here encounter.

I’m not someone who can help with this - thus my recommendation to simply stay away from 6.8

Please don’t create to what amounts to a duplicate thread for a known issue.