Skip to content

Commit 20d4fe3

Browse files
author
William Kemper
committed
8351464: Shenandoah: Hang on ShenandoahController::handle_alloc_failure when run test TestAllocHumongousFragment#generational
Reviewed-by: xpeng, ysr
1 parent 8e53063 commit 20d4fe3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ void ShenandoahControlThread::run_service() {
167167
notify_gc_waiters();
168168
}
169169

170-
// If this was the allocation failure GC cycle, notify waiters about it
171-
if (alloc_failure_pending) {
170+
// If this cycle completed without being cancelled, notify waiters about it
171+
if (!heap->cancelled_gc()) {
172172
notify_alloc_failure_waiters();
173173
}
174174

src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ void ShenandoahGenerationalControlThread::run_gc_cycle(const ShenandoahGCRequest
277277
notify_gc_waiters();
278278
}
279279

280-
// If this was an allocation failure GC cycle, notify waiters about it
281-
if (ShenandoahCollectorPolicy::is_allocation_failure(request.cause)) {
280+
// If this cycle completed successfully, notify threads waiting to retry allocation
281+
if (!_heap->cancelled_gc()) {
282282
notify_alloc_failure_waiters();
283283
}
284284

test/hotspot/jtreg/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ gc/TestAlwaysPreTouchBehavior.java#Z 8334513 generic-all
100100
gc/TestAlwaysPreTouchBehavior.java#Epsilon 8334513 generic-all
101101
gc/shenandoah/oom/TestAllocOutOfMemory.java#large 8344312 linux-ppc64le
102102
gc/shenandoah/TestEvilSyncBug.java#generational 8345501 generic-all
103-
gc/TestAllocHumongousFragment.java#generational 8351464 generic-all
104103

105104
#############################################################################
106105

0 commit comments

Comments
 (0)