RFR: 8307526: [JFR] Better handling of tampered JFR repository [v8]
Joakim Nordström
jnordstrom at openjdk.org
Tue Jul 4 07:20:09 UTC 2023
> This change makes sure that "JFR Periodic Task" isn't interrupted by any errors. This can happen when an unfinished chunkfile is removed "in-flight", which would lead to the chunkfiles not being rotated properly, and the maxsize/maxage being ignored.
>
> With this fix, when an unfinished chunkfile is detected, all of the chunkfiles in the recording are checked for existence (since one likely cause for this could be f.i. 'rm -r /tmp' being invoked, effectively deleting all chunkfiles). Upon seeing missing chunkfiles, an error is logged, and emitted to the recording to signal that some data might be missing.
> A check to catch any missing chunkfiles is also added when dumping a recording -- this can happen if only finished chunkfiles have been removed, which is not detected in-flight.
>
> Also, a check was added to the file purger to check whether the file had already been deleted to not fill the purge list with already removed files.
Joakim Nordström has updated the pull request incrementally with one additional commit since the last revision:
Fixes
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14360/files
- new: https://git.openjdk.org/jdk/pull/14360/files/a5a6ce99..0f3b9ca5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14360&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14360&range=06-07
Stats: 4 lines in 3 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/14360.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14360/head:pull/14360
PR: https://git.openjdk.org/jdk/pull/14360
More information about the hotspot-jfr-dev
mailing list