RFR: 8304824: NMT should not use ThreadCritical [v3]

Thomas Stuefe stuefe at openjdk.org
Fri Sep 13 16:15:20 UTC 2024


On Fri, 13 Sep 2024 14:02:38 GMT, Robert Toyonaga <duke at openjdk.org> wrote:

> After switching to a Hotspot Mutex, it looks like the `windows-x64 / test (hs/tier1 common) GHA` is failing because the test `release_bad_ranges` in test_os.cpp is expecting an assertion and an error message to be printed. However, when this printing happens, `tty_lock` gets acquired out of rank order with the already held `NMT_lock`, causing the lock rank assertion fail. One solution would be to lower the rank of `tty_lock`. I'm not sure that's the best solution because that might cause rank conflicts with other locks (and it makes sense to give locks the highest possible rank to minimize future conflicts).

What code exactly locks tty_lock?

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

PR Comment: https://git.openjdk.org/jdk/pull/20852#issuecomment-2349310026


More information about the serviceability-dev mailing list