JDK-8081354 : java/nio/file/FileStore/Basic.java fails with: java.nio.file.NoSuchFileException: /usr/jserv
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2015-05-28
  • Updated: 2015-07-31
  • Resolved: 2015-07-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_minorResolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Not exactly sure how to categorize this bug or if it's a bug at all but it might happen to people randomly:

STDOUT:
/ (rootfs) (name=rootfs type=rootfs)
/proc (proc) (name=proc type=proc)
/sys (sysfs) (name=sysfs type=sysfs)
/dev (devtmpfs) (name=devtmpfs type=devtmpfs)
/sys/kernel/security (securityfs) (name=securityfs type=securityfs)
/dev/shm (tmpfs) (name=tmpfs type=tmpfs)
/dev/pts (devpts) (name=devpts type=devpts)
/run (tmpfs) (name=tmpfs type=tmpfs)
/sys/fs/cgroup (tmpfs) (name=tmpfs type=tmpfs)
/sys/fs/cgroup/systemd (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/cpuset (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/cpu,cpuacct (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/memory (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/devices (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/freezer (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/net_cls (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/blkio (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/perf_event (cgroup) (name=cgroup type=cgroup)
/sys/fs/cgroup/hugetlb (cgroup) (name=cgroup type=cgroup)
/ (/dev/mapper/ol_sc14a502-root) (name=/dev/mapper/ol_sc14a502-root type=xfs)
/sys/fs/selinux (selinuxfs) (name=selinuxfs type=selinuxfs)
/var/lib/nfs/rpc_pipefs (sunrpc) (name=sunrpc type=rpc_pipefs)
/proc/sys/fs/binfmt_misc (systemd-1) (name=systemd-1 type=autofs)
/sys/kernel/debug (debugfs) (name=debugfs type=debugfs)
/proc/fs/nfsd (sunrpc) (name=sunrpc type=nfsd)
/dev/mqueue (mqueue) (name=mqueue type=mqueue)
/dev/hugepages (hugetlbfs) (name=hugetlbfs type=hugetlbfs)
/boot (/dev/sda1) (name=/dev/sda1 type=xfs)
/misc (/etc/auto.misc) (name=/etc/auto.misc type=autofs)
/net (-hosts) (name=-hosts type=autofs)
/workspace (auto_workspace) (name=auto_workspace type=autofs)
/shared (auto_shared) (name=auto_shared type=autofs)
/import (auto_import) (name=auto_import type=autofs)
/share (auto_share) (name=auto_share type=autofs)
/micro (auto_micro) (name=auto_micro type=autofs)
/znfs (auto_zones) (name=auto_zones type=autofs)
/scde (auto_scde) (name=auto_scde type=autofs)
/kits (auto_kits) (name=auto_kits type=autofs)
/java (auto_java) (name=auto_java type=autofs)
/home (auto_home) (name=auto_home type=autofs)
/src (auto_src) (name=auto_src type=autofs)
/ws (auto_ws) (name=auto_ws type=autofs)
/u (auto_home) (name=auto_home type=autofs)
/h (-hosts) (name=-hosts type=autofs)
/usr/jserv (auto_direct) (name=auto_direct type=autofs)
STDERR:
java.nio.file.NoSuchFileException: /usr/jserv
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileStore.readAttributes(UnixFileStore.java:111)
	at sun.nio.fs.UnixFileStore.getTotalSpace(UnixFileStore.java:118)
	at Basic.doTests(Basic.java:119)
	at Basic.main(Basic.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:502)
	at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:218)
	at java.lang.Thread.run(Thread.java:745)

Comments
Resolving as a duplicate of JDK-8073078. If the problem arises again, a new issue may be filed.
31-07-2015

If assertTrue(!store.equals(prev)) is failing then it suggests that we have an issue with the FileStore#equals method on OS X. I think we need to look into that first.
30-07-2015

I don't see how the test should enforce that consecutive filestores should not be equal. Since the doc for getFileStores() says,"The order of the elements is not defined and the file stores may change during the lifetime of the Java virtual machine ", you can neither depend on a stable listing to check consecutives nor can 2 filestores, even if they are consecutive for one iteration, be guaranteed to be consecutive for the next (we've seen this is the case, that they are not as mounts disappear). If a different automount was listed last, it might fail depending on if it was automounted at the time of the test too. I think it's incorrect that the test enforces this check. Why only check consecutive, why not check against all preceding? Removing this check would stabilize the test (that or also check the mount type before failing): // two distinct FileStores should not be equal assertTrue(!store.equals(prev));
29-07-2015

Working on it. There are several related issues here.
29-07-2015

See also INTJDK-7614806 and JDK-8073078, this test (plus a few others) are sensitive to environmental issues like bad mounts or stale NFS mounts.
28-05-2015