RFR: 8343244: Aarch64: Internal Error virtualMemoryTracker.cpp:444 assert(reserved_rgn != nullptr) failed: Add committed region, No reserved region found [v4]

Johan Sjölen jsjolen at openjdk.org
Wed Nov 6 16:12:49 UTC 2024


> Hi,
> 
> Ping @roberttoyonaga , @tstuefe , @afshin-zafari , @dholmes-ora , @gerard-ziemski
> 
> We are seeing issues with the transition to one of our 'fat' mutexes. Specifically, we do have `os::commit_memory` that occurs during the running `Thread`'s initialization, see the following stack trace:
> 
> 
> Stack: [0x0000ffff686ae000,0x0000ffff687ae000], sp=0x0000ffff687ac5f0, free space=1017k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
> V [libjvm.so+0x16aa67c] VirtualMemoryTracker::add_committed_region(unsigned char*, unsigned long, NativeCallStack const&)+0x38c (virtualMemoryTracker.cpp:444)
> V [libjvm.so+0x131134c] os::commit_memory(char*, unsigned long, bool)+0x198 (memTracker.hpp:165)
> V [libjvm.so+0x14ddf54] StackOverflow::create_stack_guard_pages()+0x70 (stackOverflow.cpp:97)
> V [libjvm.so+0xe2e0dc] attach_current_thread.isra.0+0x11c (jni.cpp:3809)
> C [libExplicitAttach.so+0xa64] thread_main+0x34 (libExplicitAttach.c:45)
> C [libc.so.6+0x806b8] start_thread+0x2d8
> 
> 
> This, in turn, causes issues where the lock isn't actually taken, causing issues with the VMT. I'd like to suggest that we switch out the `Mutex` to a `PlatformMutex`. Platform mutexes are identical in construction to `ThreadCritical`, but are at least not shared globally and can be owned by the `VirtualMemoryTracker`.
> 
> If you do not agree with this change, then I suggest that we back out [8304824](https://bugs.openjdk.org/browse/JDK-8304824) ASAP and wait for a better solution.
> 
> Thanks.

Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:

  That assert is clearly incorrect

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21928/files
  - new: https://git.openjdk.org/jdk/pull/21928/files/39e28ed6..1f865bae

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21928&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21928&range=02-03

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/21928.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21928/head:pull/21928

PR: https://git.openjdk.org/jdk/pull/21928


More information about the hotspot-dev mailing list