RFR: 8309238: jdk/jfr/tool/TestView.java failed with "exitValue = 134"

Erik Gahlin egahlin at openjdk.org
Mon Jul 24 08:30:49 UTC 2023


Could I have a review of fix that prevents the ChunkParser from locking up when an end time has been set.

The problem was likely introduced with https://bugs.openjdk.org/browse/JDK-8307738 where the condition for exiting the the while loop in ChunkParser::processRecursionSafe(...) was changed. What happens is that the awaitUpdatedHeader(...) method will return true when the end time exceeds the timestamp of the last segment. This leads to chunkFinished to be set to true and the loop in ChunkParser::processRecursionSafe(...) continues to next file, but there is no file so it spins forever in RepositoryFiles::updatePaths(...)

The fix is to allow the loop to exit when absoluteChunkEnd != chunkHeader.getEnd(), which will transfer control back to ChunkParser::processRecursionSafe(...) with chunkFinished set to false, where the method can return when the last segment has been fully parsed.

Just changing the return value from "true" to "false" would be incorrect. The stream should end when all the events leading up to the end time has been parsed, not just written.

Testing: 100 * test/jdk/jdk/jfr 

Thanks
Erik

-------------

Commit messages:
 - Initial

Changes: https://git.openjdk.org/jdk/pull/14987/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14987&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309238
  Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/14987.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14987/head:pull/14987

PR: https://git.openjdk.org/jdk/pull/14987


More information about the hotspot-jfr-dev mailing list