JDK-8221331 : test/jdk/jdk/jfr/event/io/EvilInstrument.java needs to re-worked to avoid recursive initialization issues
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-03-22
  • Updated: 2020-11-09
  • Resolved: 2020-01-30
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 15
15 b09Fixed
Related Reports
Relates :  
Relates :  
Description
EvilInstrument.java is aptly named, the test is in indeed evil in that its transformer is invoked to do file and socket I/O at every class load, including when loading implementations of the socket I/O classes. This test will need changes to allow it work with the SocketImpl being developed in the sandbox (niosocketimpl-branch) in order to avoid recursive initialization issues and NPE in random places. The test only works with the old SocketImpl because most of that implementation is in native code and so there aren't additional classes when socket I/O is performed. In the new implementation, the first socket I/O operations lead to class loading events and the transformer re-running.

Comments
Changeset: dfb31205 Author: Erik Gahlin <egahlin@openjdk.org> Date: 2020-01-30 10:10:48 +0000 URL: https://git.openjdk.java.net/panama-foreign/commit/dfb31205
07-02-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/24b4c763cb22 User: egahlin Date: 2020-01-30 09:12:10 +0000
30-01-2020

This was the original issue the test was designed for, but we abandoned IOTracer in JDK 8u20. https://community.oracle.com/message/11266233#11266233 https://bugs.openjdk.java.net/browse/JDK-8029023 I think we could remove the test.
21-01-2020

Just a quick update on this one. The new SocketImpl is in jdk/jdk for JDK 13 so the EvilInstrument is excluded until it is re-worked to avoid the recursive implementation issue.
04-06-2019

Alan, thank you for explanation.
28-03-2019

The JEP to replace the platform SocketImpl is JDK-8218559, we hope to submit it soon. The changes for this JEP put EvilInstrument.java on the exclude list (ProblemList.txt) as the test needs to be re-worked to avoid recursive initialization issues. Targeting the test issue to "13" or "tbd" is fine, it won't require domain specific knowledge to fix.
28-03-2019

[~alanb] Alan, According to the description this issue is only visible in "SocketImpl being developed in the sandbox (niosocketimpl-branch) ". During Runtime triage we normally target bugs/RFEs to a specific version if the issue is visible and can be resolved on the jdk/jdk main line. We can target issues to specific non-main-line projects such as Valhalla (repo-valhalla), Panama (repo-panama), etc. We were unable to find repo-niosocketimpl or similar. Also, we are not sure how to work with this repo, how to reproduce this issue, etc. JFR sub-component is generally used for core JFR issues (product or test). Specific events are domain specific, and often require domain knowledge to fix them rather than general/core JFR knowledge.
28-03-2019

Someone moved this to core-libs/java.nio in error. This is a fragile JFR test so moving it to hotspot/jfr to triage.
27-03-2019