RFR: 8374998: Failing os::write - remove bad file

Matthias Baesken mbaesken at openjdk.org
Wed Jan 14 11:50:35 UTC 2026


On Wed, 14 Jan 2026 11:15:35 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> In filemap.cpp there is error - handling for os::write and in case of failure a 'bad' potentially incomplete file is removed.
> https://github.com/openjdk/jdk/blob/1b6c2bdd7b57891ed35e3c067871d2c0bf282824/src/hotspot/share/cds/filemap.cpp#L1059-L1062
> This should probably be done also in other coding.

There are a few other places in the coding, namely in jfr, where we could consider it too to remove a written file, what do you think ?

https://github.com/openjdk/jdk/blob/1b6c2bdd7b57891ed35e3c067871d2c0bf282824/src/hotspot/share/jfr/writers/jfrStreamWriterHost.inline.hpp#L80-L84

Also this one maybe ?

https://github.com/openjdk/jdk/blob/1b6c2bdd7b57891ed35e3c067871d2c0bf282824/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp#L388-L392

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

PR Comment: https://git.openjdk.org/jdk/pull/29228#issuecomment-3749181032
PR Comment: https://git.openjdk.org/jdk/pull/29228#issuecomment-3749185943


More information about the hotspot-runtime-dev mailing list