-
Bug
-
Resolution: Fixed
-
P4
-
20
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8302023 | 17.0.8-oracle | Alex Menkov | P4 | Resolved | Fixed | b01 |
JDK-8296038 | 17.0.6 | Andrew Dinn | P4 | Resolved | Fixed | b01 |
> java.lang.RuntimeException: Wrong number of class unload events: expected 10 got 0
Note this is different than
> java.lang.RuntimeException: Wrong number of class unload events: expected 10 got 4
com/sun/jdi/ClassUnloadEventTest.java is a newer tests that is testing the generating of JDI ClassUnloadEvents. There were some rare cases of it failing to properly generate the events.
Some unique attributes of this failure when compared to
1. Always on windows-x64-debug. Not on any other platforms (unlike
2. Only with -Xcomp plus some other compiler related options that may or may not also have an impact.
3. The test complains that it got 0 of 10 expected events, whereas for
4. Added delay in the debuggee does not fix the problem.
I made some changes to the test to print the output of the debuggee and also turned on -Xlog:class+unload=info, and indeed the test classes are not being unloaded, so this does not appear to be a JVMTI or debug agent issue.
The test uses ClassUnloadCommon.triggerUnloading(), just like many other tests do. I assume this is reliable, but maybe it is not for some reason with this particular test case.
The other possible cause I thought of that is in rare cases the debuggee is compiled in a way that results in a reference to the ClassLoader or a Class being retained.
- backported by
-
JDK-8296038 com/sun/jdi/ClassUnloadEventTest.java failed due to classes not unloading
- Resolved
-
JDK-8302023 com/sun/jdi/ClassUnloadEventTest.java failed due to classes not unloading
- Resolved
- relates to
-
JDK-8256811 Delayed/missed jdwp class unloading events
- Resolved
-
JDK-8291456 com/sun/jdi/ClassUnloadEventTest.java failed with: Wrong number of class unload events: expected 10 got 4
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/97320040
-
Commit openjdk/jdk/6a266c4d
-
Review openjdk/jdk17u-dev/831
-
Review openjdk/jdk/10519