[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock
From:       Coleen Phillimore <coleenp () openjdk ! org>
Date:       2024-01-31 19:02:08
Message-ID: zsgIr8-Xrh0jfgEEvfwhmlCViCSJuC5-NhUiSGgycgs=.c54cd0a0-11f4-4963-a976-8c63907cdae3 () github ! com
[Download RAW message or body]

This change uses a claim token to allocate multi dimensional arrays rather than holding MultiArray_lock around metaspace allocation.  We can't hold a mutex around metaspace allocation because it can create an OOM object and it can also call into JVMTI for a resource exhausted event.  Also, we were creating mirrors and more metadata arrays while holding this lock.   See the bug for more details and other ideas considered and rejected.

Tested with tier1-7.

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

Commit messages:
 - Some more cleanups, and make token really recursive.
 - 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock

Changes: https://git.openjdk.org/jdk/pull/17660/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17660&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8308745
  Stats: 156 lines in 10 files changed: 90 ins; 17 del; 49 mod
  Patch: https://git.openjdk.org/jdk/pull/17660.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17660/head:pull/17660

PR: https://git.openjdk.org/jdk/pull/17660
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic