RFR: 8333290: NMT report should not print Metaspace info if Metaspace is not yet initialized

Stefan Karlsson stefank at openjdk.org
Fri May 31 15:46:03 UTC 2024


On Fri, 31 May 2024 07:07:11 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Somewhat trivial fix to a small initialization problem ubsan uncovered. 
> 
> If hs-err file gets dumped after NMT initialization but before Metaspace initialization, we may see secondary crashes during error log writing, since NMT reports contain metaspace counters, and those are not ready yet. We should omit that info if metaspace has not yet been initialized.
> 
> (See prior discussions in https://github.com/openjdk/jdk/pull/19435)

Thanks for fixing it this way. Looks good. A question about a nit below:

src/hotspot/share/nmt/memReporter.cpp line 275:

> 273: 
> 274: void MemSummaryReporter::report_metadata(Metaspace::MetadataType type) const {
> 275: 

You have an extra blank line here, but maybe that is intentional?

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

Marked as reviewed by stefank (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19493#pullrequestreview-2091157761
PR Review Comment: https://git.openjdk.org/jdk/pull/19493#discussion_r1622608845


More information about the hotspot-runtime-dev mailing list