Please recheck /var/lib/snapd/seccomp/bpf/snap.$SNAP_NAME.src and make sure that mq_timedreceive is uncommented. If it is commented, uncomment and recompile the profile binary as follows.
I could not find any snap interface for posix message queue.
Also did not get any specific reason for not allowing the posix message queue within snap.
here you could simply use a System Files interface instead of hacking the rules directly … (this will indeed not help with the seccomp side of things, that hack is still needed)
system-files interface did not work for me during msg-queue create/write operation.
Was getting Apparmor violation even after adding below configuration in yaml file.
Not using sudo (root user). works in normal user mode once required seccomp and apparmor policy in place.
To wok in sudo mode, need to connect snap with log-observe interface (to get dac_override capability).