RFR: 8256008: UL does not report anything if disk writing fails [v3]

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Dec 2 00:43:08 UTC 2020


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/1106/files
  - new: https://git.openjdk.java.net/jdk/pull/1106/files/6b4bfc23..8f3f3f1e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1106&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1106&range=01-02

  Stats: 10 lines in 2 files changed: 2 ins; 2 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1106.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1106/head:pull/1106

PR: https://git.openjdk.java.net/jdk/pull/1106


More information about the hotspot-runtime-dev mailing list