mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
7014261: G1: RSet-related failures
A race between the concurrent cleanup thread and the VM thread while it is processing the "expanded sparse table list" causes both threads to try to free the same sparse table entry and either causes one of the threads to fail or leaves the entry in an inconsistent state. The solution is purge all entries on the expanded list that correspond go regions that are being cleaned up. Reviewed-by: brutisso, johnc
This commit is contained in:
parent
14f4450d25
commit
ded092cb70
7 changed files with 171 additions and 36 deletions
|
@ -4925,10 +4925,11 @@ void G1CollectedHeap::evacuate_collection_set() {
|
|||
COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
|
||||
}
|
||||
|
||||
void G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr,
|
||||
void G1CollectedHeap::free_region_if_empty(HeapRegion* hr,
|
||||
size_t* pre_used,
|
||||
FreeRegionList* free_list,
|
||||
HumongousRegionSet* humongous_proxy_set,
|
||||
HRRSCleanupTask* hrrs_cleanup_task,
|
||||
bool par) {
|
||||
if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young()) {
|
||||
if (hr->isHumongous()) {
|
||||
|
@ -4937,6 +4938,8 @@ void G1CollectedHeap::free_region_if_totally_empty(HeapRegion* hr,
|
|||
} else {
|
||||
free_region(hr, pre_used, free_list, par);
|
||||
}
|
||||
} else {
|
||||
hr->rem_set()->do_cleanup_work(hrrs_cleanup_task);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue