Skip to content

Commit

Permalink
8266432: ZGC: GC allocation stalls can trigger deadlocks
Browse files Browse the repository at this point in the history
Reviewed-by: pliden, ayang
  • Loading branch information
stefank committed May 4, 2021
1 parent 30ccd80 commit ce1bc9d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/hotspot/share/gc/z/zForwarding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,8 @@ void ZForwarding::release_page() {

bool ZForwarding::wait_page_released() const {
if (Atomic::load_acquire(&_ref_count) != 0) {
ZLocker<ZConditionLock> locker(&_ref_lock);
if (_ref_abort) {
return false;
}

ZStatTimer timer(ZCriticalPhaseRelocationStall);
ZLocker<ZConditionLock> locker(&_ref_lock);
while (Atomic::load_acquire(&_ref_count) != 0) {
if (_ref_abort) {
return false;
Expand Down

0 comments on commit ce1bc9d

Please sign in to comment.