JDK-8235946 : jdk/jfr/jmx/security/TestEnoughPermission.java failed due to "IOException: Unexpected error during I/O operation"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 14
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2019-12-14
  • Updated: 2023-08-15
  • Resolved: 2020-01-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 14
14Resolved
Related Reports
Duplicate :  
Sub Tasks
JDK-8236130 :  
Description
The following test failed in the JDK14 CI:

jdk/jfr/jmx/security/TestEnoughPermission.java

Here's a snippet from the log file:

</configuration>

A
B
C
D
E
----------System.err:(33/2521)----------
java.io.IOException: Unexpected error during I/O operation
	at jdk.jfr/jdk.jfr.internal.WriteableUserPath.doPriviligedIO(WriteableUserPath.java:136)
	at jdk.jfr/jdk.jfr.internal.PlatformRecording.dumpStopped(PlatformRecording.java:697)
	at jdk.jfr/jdk.jfr.internal.PlatformRecording.dump(PlatformRecording.java:690)
	at jdk.jfr/jdk.jfr.Recording.dump(Recording.java:376)
	at jdk.management.jfr/jdk.management.jfr.FlightRecorderMXBeanImpl.copyTo(FlightRecorderMXBeanImpl.java:258)
	at jdk.jfr.jmx.security.TestEnoughPermission.testRecording(TestEnoughPermission.java:89)
	at jdk.jfr.jmx.security.TestEnoughPermission.main(TestEnoughPermission.java:61)
	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.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)
java.io.IOException: Unexpected error during I/O operation
	at jdk.jfr/jdk.jfr.internal.WriteableUserPath.doPriviligedIO(WriteableUserPath.java:136)
	at jdk.jfr/jdk.jfr.internal.PlatformRecording.dumpStopped(PlatformRecording.java:697)
	at jdk.jfr/jdk.jfr.internal.PlatformRecording.dump(PlatformRecording.java:690)
	at jdk.jfr/jdk.jfr.Recording.dump(Recording.java:376)
	at jdk.management.jfr/jdk.management.jfr.FlightRecorderMXBeanImpl.copyTo(FlightRecorderMXBeanImpl.java:258)
	at jdk.jfr.jmx.security.TestEnoughPermission.testRecording(TestEnoughPermission.java:89)
	at jdk.jfr.jmx.security.TestEnoughPermission.main(TestEnoughPermission.java:61)
	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.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.io.IOException: Unexpected error during I/O operation
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.io.IOException: Unexpected error during I/O operation
----------rerun:(40/6922)*----------

So far the failure has been seen on Linux, macOSX and win* machines.
Comments
Duplicate of JDK-8236582
07-01-2020

Problem is that FileChannel.tranferFrom now requires permission ("java.lang.reflect.ReflectPermission" "suppressAccessChecks"). This check was added with the implementation of JEP 352: Non-Volatile Mapped Byte Buffers. Seems unreasonable that users would need suppress access checks before calling transferFrom java.lang.InternalError: java.security.AccessControlException: access denied ("java.lang.reflect.ReflectPermission" "suppressAccessChecks") at java.base/jdk.internal.misc.ExtendedMapMode.<clinit>(ExtendedMapMode.java:46) at java.base/sun.nio.ch.FileChannelImpl.isSync(FileChannelImpl.java:1119) at java.base/sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:994) at java.base/sun.nio.ch.FileChannelImpl.transferFromFileChannel(FileChannelImpl.java:709) at java.base/sun.nio.ch.FileChannelImpl.transferFrom(FileChannelImpl.java:780) at jdk.jfr/jdk.jfr.internal.ChunksChannel.transferTo(ChunksChannel.java:102) at jdk.jfr/jdk.jfr.internal.PlatformRecording.lambda$dumpStopped$3(PlatformRecording.java:699) at jdk.jfr/jdk.jfr.internal.WriteableUserPath$1.run(WriteableUserPath.java:129) at jdk.jfr/jdk.jfr.internal.WriteableUserPath$1.run(WriteableUserPath.java:126) at java.base/java.security.AccessController.doPrivileged(AccessController.java:691) at jdk.jfr/jdk.jfr.internal.WriteableUserPath.doPriviligedIO(WriteableUserPath.java:126) at jdk.jfr/jdk.jfr.internal.PlatformRecording.dumpStopped(PlatformRecording.java:697) at jdk.jfr/jdk.jfr.internal.PlatformRecording.dump(PlatformRecording.java:690) at jdk.jfr/jdk.jfr.Recording.dump(Recording.java:376) at jdk.management.jfr/jdk.management.jfr.FlightRecorderMXBeanImpl.copyTo(FlightRecorderMXBeanImpl.java:258) at jdk.jfr.jmx.security.TestEnoughPermission.testRecording(TestEnoughPermission.java:89) at jdk.jfr.jmx.security.TestEnoughPermission.main(TestEnoughPermission.java:61) 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.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:832)
07-01-2020

ILW = HLM = P3
17-12-2019

Please fix or ProblemList. Bumped to P3 for CI noise.
17-12-2019