-
Bug
-
Resolution: Fixed
-
P3
-
8u172, 9
-
b01
-
x86_64
-
linux
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8214636 | 8u211 | Brian Burkhalter | P3 | Resolved | Fixed | b01 |
JDK-8208175 | 8u202 | Brian Burkhalter | P3 | Resolved | Fixed | b01 |
JDK-8220982 | emb-8u211 | Brian Burkhalter | P3 | Resolved | Fixed | master |
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
[root@6b8ab63d2271 /]# uname -a
Linux 6b8ab63d2271 4.6.0-0.bpo.1-amd64 #1 SMP Debian 4.6.3-1~bpo8+1 (2016-07-13) x86_64 x86_64 x86_64 GNU/Linux
[root@6b8ab63d2271 /]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
EXTRA RELEVANT SYSTEM CONFIGURATION :
Host System: Debian Jessie
Runs Docker version 1.12.1, build 23cf638 started with --storage-driver=overlay
Error does occur inside of the docker container which is centos 7
A DESCRIPTION OF THE PROBLEM :
When running java inside of a docker container which root fs is an overlayfs
e.g. from mount: overlay on / type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay/7f380aa866f1411985b0e3d9533e89f0907e11adb81c2c1e20a5733fd3112f33/root,upperdir=/var/lib/docker/overlay/58f650cc4005e9becf01c20b2d8144a372115d11add9e70774322232e3fef590/upper,workdir=/var/lib/docker/overlay/58f650cc4005e9becf01c20b2d8144a372115d11add9e70774322232e3fef590/work)
And accessing a file like /home/someuser/somefile.txt
An Exception will be thrown.
A very similar Case seems to exist with btrfs and subvolumes:
https://github.com/elastic/elasticsearch/issues/14337 and
https://github.com/elastic/elasticsearch/issues/12018
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start a docker container where dockerd was started with --overlfay and try to access files via Files.getFileStore(path)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Result should be / (if there is no other mount)
ACTUAL -
java.io.IOException: Mount point not found
ERROR MESSAGES/STACK TRACES THAT OCCUR :
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 MyMain.main(MyMain.java:8)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class MyMain {
public static void main(String[] args) throws IOException {
System.out.println(Files.getFileStore(Paths.get(args[0])));
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8208175 (fs) Mount point not found for a file which is present in overlayfs
-
- Resolved
-
-
JDK-8214636 (fs) Mount point not found for a file which is present in overlayfs
-
- Resolved
-
-
JDK-8220982 (fs) Mount point not found for a file which is present in overlayfs
-
- Resolved
-
- duplicates
-
JDK-8194283 java/nio/file/FileStore/Basic.java fails with java.io.IOException: Mount point not found
-
- Closed
-
- relates to
-
JDK-8166162 (fs) Cannot obtain FileStore if device of path is not in /proc/mounts
-
- Open
-
-
JDK-8165323 (fs) Files.getFileStore fails with "Mount point not found" in chroot environment
-
- Resolved
-
- links to