Skip to content

Commit ce1bc9d

Browse files
committed
8266432: ZGC: GC allocation stalls can trigger deadlocks
Reviewed-by: pliden, ayang
1 parent 30ccd80 commit ce1bc9d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/hotspot/share/gc/z/zForwarding.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,8 @@ void ZForwarding::release_page() {
132132

133133
bool ZForwarding::wait_page_released() const {
134134
if (Atomic::load_acquire(&_ref_count) != 0) {
135-
ZLocker<ZConditionLock> locker(&_ref_lock);
136-
if (_ref_abort) {
137-
return false;
138-
}
139-
140135
ZStatTimer timer(ZCriticalPhaseRelocationStall);
136+
ZLocker<ZConditionLock> locker(&_ref_lock);
141137
while (Atomic::load_acquire(&_ref_count) != 0) {
142138
if (_ref_abort) {
143139
return false;

0 commit comments

Comments
 (0)