Skip to content

Commit

Permalink
8348092: Shenandoah: assert(nk >= _lowest_valid_narrow_klass_id && nk…
Browse files Browse the repository at this point in the history
… <= _highest_valid_narrow_klass_id) failed: narrowKlass ID out of range (3131947710)

Reviewed-by: shade
  • Loading branch information
William Kemper committed Feb 13, 2025
1 parent 0b50e47 commit 28e744d
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,11 +947,25 @@ class ShenandoahConcurrentWeakRootsEvacUpdateTask : public WorkerTask {
void ShenandoahConcurrentGC::op_weak_roots() {
ShenandoahHeap* const heap = ShenandoahHeap::heap();
assert(heap->is_concurrent_weak_root_in_progress(), "Only during this phase");
// Concurrent weak root processing
ShenandoahTimingsTracker t(ShenandoahPhaseTimings::conc_weak_roots_work);
ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_weak_roots_work);
ShenandoahConcurrentWeakRootsEvacUpdateTask task(ShenandoahPhaseTimings::conc_weak_roots_work);
heap->workers()->run_task(&task);
{
// Concurrent weak root processing
ShenandoahTimingsTracker t(ShenandoahPhaseTimings::conc_weak_roots_work);
ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_weak_roots_work);
ShenandoahConcurrentWeakRootsEvacUpdateTask task(ShenandoahPhaseTimings::conc_weak_roots_work);
heap->workers()->run_task(&task);
}

{
// It is possible for mutators executing the load reference barrier to have
// loaded an oop through a weak handle that has since been nulled out by
// weak root processing. Handshaking here forces them to complete the
// barrier before the GC cycle continues and does something that would
// change the evaluation of the barrier (for example, resetting the TAMS
// on trashed regions could make an oop appear to be marked _after_ the
// region has been recycled).
ShenandoahTimingsTracker t(ShenandoahPhaseTimings::conc_weak_roots_rendezvous);
heap->rendezvous_threads("Shenandoah Concurrent Weak Roots");
}
}

void ShenandoahConcurrentGC::op_class_unloading() {
Expand Down

0 comments on commit 28e744d

Please sign in to comment.