RFR: 8256008: UL does not report anything if disk writing fails [v3]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Dec 2 06:25:57 UTC 2020
On Wed, 2 Dec 2020 00:43:08 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> If there are no disk space enough to write UL, it does not report. So the user cannot know lack of logs timely.
>>
>> `LogFileStreamOutput::write()` uses `jio_fprintf()` and `fflush()` to write log. However return values from them would not be checked.
>> We should check them, and should report what happened if error occurred.
>>
>>
>> How to reproduce on Linux:
>>
>> 1. Mount tmpfs with 512K
>>
>> $ mkdir /tmp/tmp
>> $ mount -t tmpfs -o size=512k tmpfs /tmp/tmp
>>
>> 2. Run `java` with `-Xlog`
>>
>> $ java -Xlog:all=trace:file=/tmp/tmp/all.log --version
>
> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>
> Update PR
> * Move write_error_is_shown to private member in LogFileStreamOutput
> * Update condition at WRITE_LOG_WITH_RESULT_CHECK macro
Looks good to me now. Thanks for fixing!
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1106
More information about the hotspot-runtime-dev
mailing list