[CRIU] [PATCH] UBUNTU: SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay
Christian Brauner
christian.brauner at ubuntu.com
Sun Apr 19 14:18:55 MSK 2020
On Sun, Apr 19, 2020 at 01:59:18AM -0700, Andrei Vagin wrote:
> The hack was introduced in ("UBUNTU: SAUCE: overlayfs: allow with
> shiftfs as underlay") and it broke checkpoint/restore of docker
> contains:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1857257
>
> The following script can be used to trigger the issue:
> #!/bin/bash
>
> cat > test.py << EOF
> import sys
>
> f = open("/proc/self/maps")
>
> for l in f.readlines():
> if "python" not in l:
> continue
> print(l)
> s = l.split()
> start, end = s[0].split("-")
> fname = s[-1]
> print(start, end, fname)
> break
> else:
> sys.exit(1)
>
> test_file1 = open(fname)
> test_file2 = open("/proc/self/map_files/%s-%s" % (start, end))
>
> fdinfo1 = open("/proc/self/fdinfo/%d" % test_file1.fileno()).read()
> fdinfo2 = open("/proc/self/fdinfo/%d" % test_file2.fileno()).read()
>
> if fdinfo1 != fdinfo2:
> print("FAIL")
> print(test_file1)
> print(fdinfo1)
> print(test_file2)
> print(fdinfo2)
> sys.exit(1)
> print("PASS")
> EOF
> sudo docker run -it --privileged --rm -v `pwd`:/mnt python python /mnt/test.py
>
> Cc: Christian Brauner <christian.brauner at ubuntu.com>
> Cc: Stefan Bader <stefan.bader at canonical.com>
> Cc: Connor Kuehl <connor.kuehl at canonical.com>
> Cc: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> Fixes: 58009298c6bd ("UBUNTU: SAUCE: overlayfs: allow with shiftfs as underlay")
> Signed-off-by: Andrei Vagin <avagin at gmail.com>
Thanks for looking into this. Seems ok to me.
Acked-by: Christian Brauner <christian.brauner at ubuntu.com>
More information about the CRIU
mailing list