RFR: 8309238: jdk/jfr/tool/TestView.java failed with "exitValue = 134"
Markus Grönlund
mgronlun at openjdk.org
Mon Jul 24 10:08:40 UTC 2023
On Sun, 23 Jul 2023 19:38:54 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:
> 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
Marked as reviewed by mgronlun (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/14987#pullrequestreview-1543133384
More information about the hotspot-jfr-dev
mailing list