JDK-8285249 : jdk/jfr/api/consumer/streaming/TestJVMExit.java fails to attach
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 19
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-04-20
  • Updated: 2023-08-01
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
This was sighted in the loom repo but may have nothing to do with the changes in that repo.

[exit-application] [0.315s][info][jfr,startup] Started recording 1. No limit specified, using maxsize=250MB as default.
[exit-application] [0.315s][info][jfr,startup] 
[exit-application] [0.315s][info][jfr,startup] Use jcmd 26663 JFR.dump name=1 filename=FILEPATH to copy recording data to file.
Timeout refired 480 times
Attach failed: Premature EOF
Retrying...
----------System.err:(18/1139)----------
java.io.IOException: Stream closed
	at java.base/java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:172)
	at java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:373)
	at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:367)
	at java.base/java.io.InputStream.readNBytes(InputStream.java:409)
	at java.base/java.io.InputStream.readAllBytes(InputStream.java:346)
	at jdk.test.lib.jfr.StreamingUtils.getJfrRepository(StreamingUtils.java:48)
	at jdk.jfr.api.consumer.streaming.TestProcess.getRepository(TestProcess.java:94)
	at jdk.jfr.api.consumer.streaming.TestJVMExit.main(TestJVMExit.java:45)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:1555)

JavaTest Message: Test threw exception: java.io.IOException: Stream closed
JavaTest Message: shutting down test
Comments
There have been several issues related to the timing of when processes exit, please see the Related To links. This is not Loom specific; it is an interplay of the general test framework used in attaching / detaching to test processes and the jfr streaming component.
28-04-2022