Skip to content

Commit

Permalink
8317440: Lock rank checking fails when code root set is modified with…
Browse files Browse the repository at this point in the history
… the Servicelock held after JDK-8315503

Reviewed-by: coleenp, ayang
  • Loading branch information
Thomas Schatzl committed Oct 9, 2023
1 parent bcc986b commit 0cf1a55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/runtime/mutexLocker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ void mutex_init() {
MUTEX_DEFN(StringDedupIntern_lock , PaddedMutex , nosafepoint);
MUTEX_DEFN(RawMonitor_lock , PaddedMutex , nosafepoint-1);

MUTEX_DEFN(Metaspace_lock , PaddedMutex , nosafepoint-4);
MUTEX_DEFN(Metaspace_lock , PaddedMutex , nosafepoint-3);
MUTEX_DEFN(MetaspaceCritical_lock , PaddedMonitor, nosafepoint-1);

MUTEX_DEFN(Patching_lock , PaddedMutex , nosafepoint); // used for safepointing and code patching.
Expand Down Expand Up @@ -302,9 +302,9 @@ void mutex_init() {
MUTEX_DEFN(UnsafeJlong_lock , PaddedMutex , nosafepoint);
#endif

MUTEX_DEFN(ContinuationRelativize_lock , PaddedMonitor, nosafepoint-4);
MUTEX_DEFN(ContinuationRelativize_lock , PaddedMonitor, nosafepoint-3);
MUTEX_DEFN(CodeHeapStateAnalytics_lock , PaddedMutex , safepoint);
MUTEX_DEFN(ThreadsSMRDelete_lock , PaddedMonitor, nosafepoint-4); // Holds ConcurrentHashTableResize_lock
MUTEX_DEFN(ThreadsSMRDelete_lock , PaddedMonitor, service-2); // Holds ConcurrentHashTableResize_lock
MUTEX_DEFN(ThreadIdTableCreate_lock , PaddedMutex , safepoint);
MUTEX_DEFN(SharedDecoder_lock , PaddedMutex , tty-1);
MUTEX_DEFN(DCmdFactory_lock , PaddedMutex , nosafepoint);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/utilities/concurrentHashTable.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ ConcurrentHashTable(size_t log2size, size_t log2size_limit, size_t grow_hint, bo
_stats_rate = nullptr;
}
_resize_lock =
new Mutex(Mutex::nosafepoint-3, "ConcurrentHashTableResize_lock");
new Mutex(Mutex::service-1, "ConcurrentHashTableResize_lock");
_table = new InternalTable(log2size);
assert(log2size_limit >= log2size, "bad ergo");
_size_limit_reached = _table->_log2_size == _log2_size_limit;
Expand Down

1 comment on commit 0cf1a55

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.