[8u] RFA: 8165852: (fs) Mount point not found for a file which is present in overlayfs
Severin Gehwolf
sgehwolf at redhat.com
Tue Jul 24 13:40:48 UTC 2018
Hi,
Please approve this backport request for 8u. It fixes an issue on
certain Linux hosts using docker containers and overlayfs. The patch is
the same as for JDK 11 modulo some copyright year context adjustments
and path unshuffeling.
Bug: https://bugs.openjdk.java.net/browse/JDK-8165852
webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8165852/webrev.01/
Original review thread: http://mail.openjdk.java.net/pipermail/nio-dev/2018-January/004647.html
Testing: I've manually verified that the problem reproduces on current
8u and is fixed by the backport patch. Note that "java" below is
unpatched. "/java-8-openjdk-u-dev/bin/java" is patched JDK 8.
[foo at 5755c0f1ee39 ~]$ java Fs $(pwd)/test.txt
Exception in thread "main" java.io.IOException: Mount point not found
at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:91)
at sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:65)
at sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:44)
at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:51)
at sun.nio.fs.LinuxFileSystemProvider.getFileStore(LinuxFileSystemProvider.java:39)
at sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:368)
at java.nio.file.Files.getFileStore(Files.java:1461)
at Fs.main(Fs.java:8)
[foo at 5755c0f1ee39 ~]$ /java-8-openjdk-u-dev/bin/java Fs $(pwd)/test.txt
/ (rootfs)
[foo at 5755c0f1ee39 ~]$ cat Fs.java
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class Fs {
public static void main(String[] args) throws IOException {
System.out.println(Files.getFileStore(Paths.get(args[0])));
}
}
[foo at 5755c0f1ee39 ~]$ ls
Fs.class Fs.java test.txt
Thanks,
Severin
More information about the jdk8u-dev
mailing list