-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
repo-shenandoah
As currently implemented: ShenandoahHeapRegion::promote_in_place() performs the following steps:
1. Obtains the heap lock
2. Restores region top (which had been artificially set to end() to prevent young allocations within region)
3. Decreases used for young
4. Forces transfer of 1 region from young to old
5. Sets affiliation of this region to OLD
6. Increases used for OLD
7. Adds this region to the old_collector free set
8. Releases the heap lock
9. Now, a different thread allocates a PLAB within this region, and fills an alignment pad, and registers the alignment pad
10. Resume the promote_in_place() worker thread
11. Clears the remembered set object register for all objects between bottom and top()
12. Iterates over all objects from bottom to tams within the region to register them with the remembered set
This causes us to lose registration of the PLAB pad object which had been placed by the preempting thread.
An rr recording of this problem is available here: https://pernos.co/debug/l1b0ckFoTvhdIv00OLq_Jg/index.html
The fix is to move steps 11-12 before step 1
1. Obtains the heap lock
2. Restores region top (which had been artificially set to end() to prevent young allocations within region)
3. Decreases used for young
4. Forces transfer of 1 region from young to old
5. Sets affiliation of this region to OLD
6. Increases used for OLD
7. Adds this region to the old_collector free set
8. Releases the heap lock
9. Now, a different thread allocates a PLAB within this region, and fills an alignment pad, and registers the alignment pad
10. Resume the promote_in_place() worker thread
11. Clears the remembered set object register for all objects between bottom and top()
12. Iterates over all objects from bottom to tams within the region to register them with the remembered set
This causes us to lose registration of the PLAB pad object which had been placed by the preempting thread.
An rr recording of this problem is available here: https://pernos.co/debug/l1b0ckFoTvhdIv00OLq_Jg/index.html
The fix is to move steps 11-12 before step 1
- duplicates
-
JDK-8313572 GenShen: Remembered Set verification error in dacapo lusearch
- Closed