`/proc/*/maps` gets broken.
Description of the Bug/Problem:
The path proc/*/maps is not the path in a container, but the host's path .NET doesn't work well because it depends on this path.
In a container
$ cat /proc/self/maps
556115b71000-556115b73000 r--p 00000000 09:2c 1208370132 /run/containerd/io.containerd.runtime.v2.task/k8s.io/de77df3e392b5affbbf9d2a79f0e58e8e40eb69b81c95accda994a022850aef7/rootfs/usr/bin/cat
556115b73000-556115b78000 r-xp 00002000 09:2c 1208370132 /run/containerd/io.containerd.runtime.v2.task/k8s.io/de77df3e392b5affbbf9d2a79f0e58e8e40eb69b81c95accda994a022850aef7/rootfs/usr/bin/cat
...
How to Reproduce: It is probably easiest to use shiftfs with lxd
Expected behavior:
with fuse-overlayfs
$ cat /proc/self/maps
55d0c4e25000-55d0c4e27000 r--p 00000000 00:474 353127110 /usr/bin/cat
55d0c4e27000-55d0c4e2c000 r-xp 00002000 00:474 353127110 /usr/bin/cat
...
System information:
- OS/Distribution:
- Kernelversion:
$ uname -a
Linux gitpodio-gitpod-t06v332wdlr 5.16.20-051620-generic #202204131933 SMP PREEMPT Wed Apr 13 19:37:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
- dkms-version:
- shiftfs-dkms-version: https://github.com/toby63/shiftfs-dkms/tree/k5.16
Additional information/context:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1968027
Thx for the report, as you already "said", the bug is reported and known upstream, but strangely it is not yet assigned etc.
@brauner
I am a newbie in this area, is there anything I can do on our side?
I am a newbie in this area, is there anything I can do on our side?
Unless you are a developer or something similar (in that case you could debug or even fix it maybe), I guess you (or we) can't do much, but wait for a response.
A potential workaround is: If you use (or are willing to use) a filesystem that is compatible with the sucessor of shiftfs (see here for more info), then you could try that.
@toby63 I see. Thanks for your information. I recommend this issue continue to open until this kernel issue will be fixed because some users who encountered this problem look for issues in this repository.
@utam0k Yes, I will leave this Issue open, until it is hopefully solved.
To address this issue you can use the same approach as it was done for overlayfs on Ubuntu: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/kinetic/commit/?h=master-next&id=d3cdaf4a16950927ed566e54ff23dd72513f89a9 https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/kinetic/commit/?h=master-next&id=a7663d09297688fa616212b031f3ca8f53bab6f6
but adapt it for shiftfs. But you have to be very careful with the case when overlayfs is on top of shiftfs and test this cast properly too :)
And unfortunately this approach is not work for kernel module cause you need to change a lot of basic kernel files.
@mihalicyn Good to know, but rebuilding a kernel is probably not an option for many people. But maybe a distro would like to implement it.