Skip to content

8357550: GenShen crashes during freeze: assert(!chunk->requires_barriers()) failed #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,29 @@ void ShenandoahGenerationalHeap::stop() {
regulator_thread()->stop();
}

bool ShenandoahGenerationalHeap::requires_barriers(stackChunkOop obj) const {
if (is_idle()) {
return false;
}

if (is_concurrent_young_mark_in_progress() && is_in_young(obj) && !marking_context()->allocated_after_mark_start(obj)) {
// We are marking young, this object is in young, and it is below the TAMS
return true;
}

if (is_in_old(obj)) {
// Card marking barriers are required for objects in the old generation
return true;
}

if (has_forwarded_objects()) {
// Object may have pointers that need to be updated
return true;
}

return false;
}

void ShenandoahGenerationalHeap::evacuate_collection_set(bool concurrent) {
ShenandoahRegionIterator regions;
ShenandoahGenerationalEvacuationTask task(this, &regions, concurrent, false /* only promote regions */);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class ShenandoahGenerationalHeap : public ShenandoahHeap {

void stop() override;

bool requires_barriers(stackChunkOop obj) const override;

// Used for logging the result of a region transfer outside the heap lock
struct TransferResult {
bool success;
Expand Down