JDK-8230448 : [test] JFRSecurityTestSuite.java is failing on Windows
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: openjdk8u-jfr-incubator
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2019-09-02
  • Updated: 2020-05-29
  • Resolved: 2019-09-02
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
openjdk8u-jfr-incubator openjdk8u-jfr-incubator
Fixed
Related Reports
Relates :  
Description
```
java.lang.Exception: class java.io.FilePermission /etc permission check expected.
	at JFRSecurityTestSuite.assertPermission(JFRSecurityTestSuite.java:418)
	at JFRSecurityTestSuite.doInConstrainedEnvironment(JFRSecurityTestSuite.java:260)
	at JFRSecurityTestSuite.access$100(JFRSecurityTestSuite.java:73)
	at JFRSecurityTestSuite$3.run(JFRSecurityTestSuite.java:167)
	at JFRSecurityTestSuite$3.run(JFRSecurityTestSuite.java:163)
	at java.security.AccessController.doPrivileged(Native Method)
	at JFRSecurityTestSuite.main(JFRSecurityTestSuite.java:163)
	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:498)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "\\etc" "read")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.security.AccessController.checkPermission(AccessController.java:886)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
	at sun.nio.fs.WindowsChannelFactory.open(WindowsChannelFactory.java:293)
	at sun.nio.fs.WindowsChannelFactory.newFileChannel(WindowsChannelFactory.java:162)
	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:225)
	at java.nio.file.Files.newByteChannel(Files.java:361)
	at java.nio.file.Files.newByteChannel(Files.java:407)
	at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
	at java.nio.file.Files.newInputStream(Files.java:152)
	at java.nio.file.Files.newBufferedReader(Files.java:2784)
	at java.nio.file.Files.newBufferedReader(Files.java:2816)
	at jdk.jfr.Configuration.create(Configuration.java:145)
	at JFRSecurityTestSuite.lambda$doInConstrainedEnvironment$8(JFRSecurityTestSuite.java:261)
	at JFRSecurityTestSuite.assertPermission(JFRSecurityTestSuite.java:403)
	... 12 more
java.lang.Exception: TEST FAILED
java.lang.Exception: class java.io.FilePermission /etc permission check expected.
	at JFRSecurityTestSuite.main(JFRSecurityTestSuite.java:209)
	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:498)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.lang.Thread.run(Thread.java:748)

JavaTest Message: Test threw exception: java.lang.Exception: TEST FAILED
java.lang.Exception: class java.io.FilePermission /etc permission check expected.
JavaTest Message: shutting down test
```
Comments
Replacing jdk8u-fix-request with link to JDK-8239140
17-02-2020

RFC: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-January/011063.html
30-01-2020

Fixed: https://hg.openjdk.java.net/jdk8u/jdk8u-jfr-incubator/jdk/rev/a413bfadf0b2
02-09-2019