JDK-8324220 : jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java had 22 failures
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 23
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-01-19
  • Updated: 2024-01-30
  • Resolved: 2024-01-24
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 23
23 b07Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK23 CI:

jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java

Here's a snippet from the log file:

#section:junit
----------messages:(7/394)----------
command: junit jdk.jfr.event.io.TestSerializationMisdeclarationEvent
reason: User specified action: run junit/othervm jdk.jfr.event.io.TestSerializationMisdeclarationEvent 
started: Fri Jan 19 15:58:59 UTC 2024
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules jdk.jfr,java.management
finished: Fri Jan 19 15:59:09 UTC 2024
elapsed time (seconds): 9.132
----------configuration:(3/54)----------
Boot Layer
  add modules: jdk.jfr java.management

----------System.out:(0/0)----------
----------System.err:(754/78074)----------
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[1] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID, [serialVersionUID, should, explicitly]'
org.opentest4j.AssertionFailedError: jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID ==> expected: <1> but was: <0>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)

<snip>

	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
FAILED     jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[1] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID, [serialVersionUID, should, explicitly]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[2] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID, [serialPersistentFields, should, non-null]'
org.opentest4j.AssertionFailedError: jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID ==> expected: <1> but was: <0>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)

<snip>

	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
FAILED     jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[2] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$NoSUID, [serialPersistentFields, should, non-null]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[3] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$BadClass, [serialVersionUID, should, private]'
org.opentest4j.AssertionFailedError: jdk.jfr.event.io.TestSerializationMisdeclarationEvent$BadClass ==> expected: <1> but was: <0>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)

<snip>

	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
FAILED     jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[21] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$RecordClass, [serialPersistentFields, record]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[22] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$RecordClass, [method, record]'
org.opentest4j.AssertionFailedError: jdk.jfr.event.io.TestSerializationMisdeclarationEvent$RecordClass ==> expected: <1> but was: <2>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)

<snip>

	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)
FAILED     jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[22] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$RecordClass, [method, record]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[23] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$C, [method, not, accessible]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[23] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$C, [method, not, accessible]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[24] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [serialPersistentFields, should, type, ObjectStreamField[]]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[24] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [serialPersistentFields, should, type, ObjectStreamField[]]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[25] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [serialPersistentFields, must, instance, ObjectStreamField[]]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[25] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [serialPersistentFields, must, instance, ObjectStreamField[]]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[26] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, readResolve, must, non-abstract]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[26] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, readResolve, must, non-abstract]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[27] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, non-static]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[27] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, non-static]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[28] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, return]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[28] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, return]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[29] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, parameter]'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testSingleClassMisdeclarations '[29] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$Acc, [method, writeReplace, must, parameter]'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testGoodClass '[1] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$A'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testGoodClass '[1] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$A'
STARTED    jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testGoodClass '[2] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$B'
SUCCESSFUL jdk.jfr.event.io.TestSerializationMisdeclarationEvent::testGoodClass '[2] class jdk.jfr.event.io.TestSerializationMisdeclarationEvent$B'
JavaTest Message: JUnit Platform Failure(s): 22

[ JUnit Containers: found 6, started 6, succeeded 6, failed 0, aborted 0, skipped 0]
[ JUnit Tests: found 31, started 31, succeeded 9, failed 22, aborted 0, skipped 0]

java.lang.Exception: JUnit test failure
	at com.sun.javatest.regtest.agent.JUnitRunner.runWithJUnitPlatform(JUnitRunner.java:149)
	at com.sun.javatest.regtest.agent.JUnitRunner.main(JUnitRunner.java:95)
	at com.sun.javatest.regtest.agent.JUnitRunner.main(JUnitRunner.java:61)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1575)

JavaTest Message: Test threw exception: java.lang.Exception: JUnit test failure
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: JUnit test failure
----------rerun:(45/6445)*----------
Comments
The fix for this bug is integrated in jdk-23+7-467.
25-01-2024

Changeset: 00bb6bf5 Author: Raffaello Giulietti <rgiulietti@openjdk.org> Date: 2024-01-24 16:19:46 +0000 URL: https://git.openjdk.org/jdk/commit/00bb6bf5091f50268552d223e6e118574b8a4ea5
24-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17549 Date: 2024-01-24 09:38:27 +0000
24-01-2024

[~rgiulietti] - Please take a look at this new test failure that showed up in Tier6.
19-01-2024

This is a new test that was recently added by: JDK-8275338 Add JFR events for notable serialization situations
19-01-2024