JDK-8304732 : jdk/jfr/api/consumer/recordingstream/TestStop.java failed again with "Expected outer stream to have 3 events"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 21,22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,os_x
  • CPU: x86_64,aarch64
  • Submitted: 2023-03-22
  • Updated: 2024-06-26
  • Resolved: 2024-06-19
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 JDK 24
23Fixed 24 b03Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Sub Tasks
JDK-8331653 :  
Description
The following test failed in the JDK21 CI job set:

jdk/jfr/api/consumer/recordingstream/TestStop.java

Here's a snippet from the log file:

#section:main
----------messages:(7/369)----------
command: main jdk.jfr.api.consumer.recordingstream.TestStop
reason: User specified action: run main/othervm jdk.jfr.api.consumer.recordingstream.TestStop 
started: Wed Mar 22 15:39:39 UTC 2023
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules jdk.jfr,java.management
finished: Wed Mar 22 15:39:40 UTC 2023
elapsed time (seconds): 0.806
----------configuration:(3/51)----------
Boot Layer
  add modules: jdk.jfr java.management

----------System.out:(58/2318)----------
RecordingStream outer:
[jdk.jfr.api.consumer.recordingstream.TestStop$MarkEvent {
  startTime = 15:39:40.396 (2023-03-22)
  id = "a"
  eventThread = "MainThread" (javaThreadId = 21)
  stackTrace = [
    jdk.jfr.api.consumer.recordingstream.TestStop.testNestedStop() line: 118
    jdk.jfr.api.consumer.recordingstream.TestStop.main(String[]) line: 57
    jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Object, Object[]) line: 103
    java.lang.reflect.Method.invoke(Object, Object[]) line: 578
    com.sun.javatest.regtest.agent.MainWrapper$MainThread.run() line: 125
  ]
}

, jdk.jfr.api.consumer.recordingstream.TestStop$MarkEvent {
  startTime = 15:39:40.408 (2023-03-22)
  id = "b"
  eventThread = "MainThread" (javaThreadId = 21)
  stackTrace = [
    jdk.jfr.api.consumer.recordingstream.TestStop.testNestedStop() line: 127
    jdk.jfr.api.consumer.recordingstream.TestStop.main(String[]) line: 57
    jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Object, Object[]) line: 103
    java.lang.reflect.Method.invoke(Object, Object[]) line: 578
    com.sun.javatest.regtest.agent.MainWrapper$MainThread.run() line: 125
  ]
}

, jdk.jfr.api.consumer.recordingstream.TestStop$MarkEvent {
  startTime = 15:39:40.445 (2023-03-22)
  id = "c"
  eventThread = "MainThread" (javaThreadId = 21)
  stackTrace = [
    jdk.jfr.api.consumer.recordingstream.TestStop.testNestedStop() line: 133
    jdk.jfr.api.consumer.recordingstream.TestStop.main(String[]) line: 57
    jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Object, Object[]) line: 103
    java.lang.reflect.Method.invoke(Object, Object[]) line: 578
    com.sun.javatest.regtest.agent.MainWrapper$MainThread.run() line: 125
  ]
}

]
RecordingStream inner:
[jdk.jfr.api.consumer.recordingstream.TestStop$MarkEvent {
  startTime = 15:39:40.408 (2023-03-22)
  id = "b"
  eventThread = "MainThread" (javaThreadId = 21)
  stackTrace = [
    jdk.jfr.api.consumer.recordingstream.TestStop.testNestedStop() line: 127
    jdk.jfr.api.consumer.recordingstream.TestStop.main(String[]) line: 57
    jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Object, Object[]) line: 103
    java.lang.reflect.Method.invoke(Object, Object[]) line: 578
    com.sun.javatest.regtest.agent.MainWrapper$MainThread.run() line: 125
  ]
}

]
Outer count: 1
Inner count: 1
----------System.err:(12/775)----------
java.lang.AssertionError: Expected outer stream to have 3 events
	at jdk.jfr.api.consumer.recordingstream.TestStop.testNestedStop(TestStop.java:153)
	at jdk.jfr.api.consumer.recordingstream.TestStop.main(TestStop.java:57)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1623)

JavaTest Message: Test threw exception: java.lang.AssertionError: Expected outer stream to have 3 events
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.AssertionError: Expected outer stream to have 3 events
----------rerun:(38/8006)*----------

There was a similar bug fixed back in JDK20:

JDK-8298043 jdk/jfr/api/consumer/recordingstream/TestStop.java failed with "Expected outer stream to have 3 events"
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19799 Date: 2024-06-20 08:44:13 +0000
20-06-2024

Changeset: 856931d0 Author: Erik Gahlin <egahlin@openjdk.org> Date: 2024-06-19 16:23:22 +0000 URL: https://git.openjdk.org/jdk/commit/856931d01f14b1c665c04e05d5637b8237c56988
19-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/19681 Date: 2024-06-12 20:41:27 +0000
12-06-2024

The fix for JDK-8307738 was integrated in jdk-21+24-2100. The most recent sighting of this failure mode is in jdk-21+26-2315-tier6.
09-06-2023

This could be a duplicate of JDK-8307738. Let's see if it happens again after it has been checked in.
24-05-2023