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

Yasumasa Suenaga ysuenaga at openjdk.java.net
Sat Nov 7 12:35:00 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

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

Commit messages:
 - Fix typo
 - 8256008: UL does not report anything if disk writing fails

Changes: https://git.openjdk.java.net/jdk/pull/1106/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1106&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256008
  Stats: 77 lines in 2 files changed: 53 ins; 5 del; 19 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