RFR: 8280684: JfrRecorderService failes with guarantee(num_written > 0) when no space left on device. [v2]
Markus Grönlund
mgronlun at openjdk.java.net
Thu Feb 17 10:28:04 UTC 2022
On Thu, 17 Feb 2022 08:03:36 GMT, KIRIYAMA Takuya <duke at openjdk.java.net> wrote:
>> I think JFR should report an error message and jvm should shut down safely instead of gurantee failure.
>>
>> For instance, jdk.jfr.internal.Repository#newChunk() reports an appropriate message and stops jvm as below
>> by using JfrJavaSupport::abort().
>>
>> [0.673s][error][jfr] Could not create chunk in repository /tmp/2022_01_12_22_32_42_18030, class java.io.IOException: Unable to create JFR repository directory using base location (/tmp)
>> [0.673s][error][jfr,system] Could not create chunk in repository /tmp/2022_01_12_22_32_42_18030, class java.io.IOException: Unable to create JFR repository directory using base location (/tmp)
>> [0.673s][error][jfr,system] An irrecoverable error in Jfr. Shutting down VM...
>>
>> I modified StreamWriterHost not to call guarantee failure but to call JfrJavaSupport::abort().
>> I added a argument to JfrJavaSupport::abort() which tells os::abort() not to put out core
>> because there is no space on device.
>> Could you please review the fix?
>
> KIRIYAMA Takuya has updated the pull request incrementally with one additional commit since the last revision:
>
> 8280684: JfrRecorderService failes with guarantee(num_written > 0) when no space left on device.
Changes requested by mgronlun (Reviewer).
src/hotspot/share/jfr/writers/jfrStreamWriterHost.inline.hpp line 90:
> 88: JfrJavaSupport::abort(JfrJavaSupport::new_string(msg, jt), jt, false);
> 89: }
> 90: else {
The else block can be removed. Just put the guarantee inline with the other code.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7227
More information about the hotspot-jfr-dev
mailing list