Integrated: 8356233: NMT: tty->print_cr should not be used in VirtualMemoryTracker::add_reserved_region()
Gerard Ziemski
gziemski at openjdk.org
Wed May 28 19:16:57 UTC 2025
On Mon, 19 May 2025 20:11:09 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
> To help with debugging NMT we added more info when an assert gets triggered, but we used `tty`, which is involved with locks and unfortunately it triggered:
>
>
> # Internal Error (.../open/src/hotspot/share/runtime/mutex.cpp:457), pid=1088443, tid=1088520
> # assert(false) failed: Attempting to acquire lock tty_lock/tty out of order with lock NmtVirtualMemory_lock/service-4 -- possible deadlock
>
>
> We avoid this, by printing using `UL` instead of using `tty` directly.
This pull request has now been integrated.
Changeset: 28f50931
Author: Gerard Ziemski <gziemski at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/28f509317d477c5f4076658f9ae9995aa6c53631
Stats: 12 lines in 1 file changed: 3 ins; 0 del; 9 mod
8356233: NMT: tty->print_cr should not be used in VirtualMemoryTracker::add_reserved_region()
Reviewed-by: jsjolen, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/25308
More information about the hotspot-runtime-dev
mailing list