checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.77k stars 561 forks source link

/proc/pid/maps reports incorrect dev and inode numbers for files on stackable file systems (e.g. overlayfs) #2312

Closed avagin closed 5 months ago

avagin commented 7 months ago
          As far as I understand this mount related:
mnt: Path `/usr/lib64/libc.so.6' resolved to `./' mountpoint"

I don't know if and how to correctly fix it, but it seems using a mount namespace in a mount namespace does not work as expected.

The reproducer for me is. This works without a container:

setcap cap_checkpoint_restore,cap_sys_ptrace+eip criu/criu
sudo --user=#65534 --group=#65534 unshare -Ucfpm --mount-proc -- bash -c "./test/zdtm.py run -t zdtm/static/maps00 -k always  -f h --rootless && true"

But it does not work in a container. @Snorch can you say if this should work and how?

_Originally posted by @adrianreber in https://github.com/checkpoint-restore/criu/pull/2307#discussion_r1413635605_

avagin commented 7 months ago

Here is the fix: https://lkml.org/lkml/2023/12/11/1287

adrianreber commented 7 months ago

@avagin Should I update my PR with the link to this issue and your upstream patch as a comment why the test is disabled during testing in a container or do you want to wait until your change is merged?

avagin commented 6 months ago

@adrianreber sorry for the delay. I am on vacation. You can add a comment and merge this pr. In the ideal case, we need to skip this test only if a kernel does have the issue.

adrianreber commented 6 months ago

@avagin Merged with an additional comment describing the situation and referring to this issue.

github-actions[bot] commented 5 months ago

A friendly reminder that this issue had no activity for 30 days.

avagin commented 5 months ago

The kernel patch (https://github.com/torvalds/linux/commit/3efdc78fdc21) was merged and will be in v6.8.