RFR: 8263044: jdk/jfr/jvm/TestDumpOnCrash.java timed out
Erik Gahlin
egahlin at openjdk.org
Mon Oct 10 12:19:12 UTC 2022
Hi,
When a crash/emergency dump is created, it is sometimes not complete.
This is OK as there is no guarantee that a dump will succeed when the JVM crashes. Problem occurs if this happens before the first metadata event has been written (metadataPosition == 0) in which case the parser will loop indefinitely.
This is expected behavior in the streaming case (EventStream), but if the recording was opened with RecordingFile it is usually able to finish or throw an exception. The fix is to invoke pollWait() if a valid recording only consists of the header (68 bytes). This will result in similar behaviour as if the recording was terminated prematurely, but the metadata event had been written.
Testing: jdk/jdk/jfr
Thanks
Erik
-------------
Commit messages:
- Initial
Changes: https://git.openjdk.org/jdk/pull/10629/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10629&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8263044
Stats: 12 lines in 1 file changed: 10 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/10629.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10629/head:pull/10629
PR: https://git.openjdk.org/jdk/pull/10629
More information about the hotspot-jfr-dev
mailing list