JDK-8232178 : MacVolumesTest failed after upgrade to MacOS Catalina
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 8,11,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x_10.15
  • Submitted: 2019-10-11
  • Updated: 2022-06-27
  • Resolved: 2019-11-07
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.
JDK 11 JDK 13 JDK 14 JDK 8 Other
11.0.6-oracleFixed 13.0.4Fixed 14 b23Fixed 8u241Fixed openjdk8u322Fixed
Related Reports
Relates :  
Relates :  
Description
After upgrade to MacOS Catalina, 10.15, the test failed because the /System/Volumes/Data/tmp doesn't exist.

Not certain if this should be considered MacOS upgrade issue or the tmp folder is gone for good.


----------System.err:(23/1587)----------
java.nio.file.NoSuchFileException: /System/Volumes/Data/tmp
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileStore.devFor(UnixFileStore.java:59)
	at java.base/sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:66)
	at java.base/sun.nio.fs.BsdFileStore.<init>(BsdFileStore.java:40)
	at java.base/sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:46)
	at java.base/sun.nio.fs.BsdFileSystemProvider.getFileStore(BsdFileSystemProvider.java:34)
	at java.base/sun.nio.fs.UnixFileSystemProvider.getFileStore(UnixFileSystemProvider.java:373)
	at java.base/java.nio.file.Files.getFileStore(Files.java:1491)
	at MacVolumesTest.checkDataVolume(MacVolumesTest.java:113)
	at MacVolumesTest.main(MacVolumesTest.java:198)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:830)

JavaTest Message: Test threw exception: java.nio.file.NoSuchFileException
JavaTest Message: shutting down test

----------System.out:(5/201)----------
--- Checking system volume / ---
Using root test file /etc/manpaths
/etc/manpaths creation time: 2019-08-24T22:20:18Z
Read 36 bytes from /etc/manpaths
--- Checking data volume /System/Volumes/Data ---
result: Failed. Execution failed: `main' threw exception: java.nio.file.NoSuchFileException: /System/Volumes/Data/tmp


test result: Failed. Execution failed: `main' threw exception: java.nio.file.NoSuchFileException: /System/Volumes/Data/tmp

Comments
Fix request (8u) Backport is requested for parity with 8u-oracle. Review approval: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2021-October/014370.html
19-10-2021

jdk13u Fix Request I would like to have the patch as well in jdk13, because it affected jdk13 too. The patch applies cleanly.
18-05-2020

jdk11u Fix Request I would like to have the patch as well in jdk11, because it affected jdk11 too. The patch applies cleanly.
15-11-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/19744a63c295 User: bpb Date: 2019-11-07 21:54:10 +0000
07-11-2019

It's possible that /Systems/Data/Volumes/tmp existed spuriously on the system I tested this on and I just missed it. On Catalina the structure should be: /private -> /Systems/Data/Volumes/private /tmp -> /private/tmp
14-10-2019

I believe that will work, the private/tmp does exist and is writable.
14-10-2019

Perhaps line 112 needs to be changed to Path data = Path.of(DATA_VOLUME, "private", "tmp");
14-10-2019

I suspect /Systems/Data/Volumes/tmp should instead be /Systems/Data/Volumes/private/tmp. Will check it out when I have access to a Catalina system.
14-10-2019