Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes eclipse-openj9/openj9#13206 This change switches the order between updating INIT table (tuneToHeap call) and setting mark bits in place. This way, we guarantee that MM bits are set in place when we miss to update INIT table (or it's not updated in time) given overlap of KO and Tenure Expand. The issue being resolved is similar to what has been outlined in a previous issue [eclipse-openj9/openj9#8020 (comment)], where Mark Map Bits get missed for init. Here, we have another similar timing hole, when one thread kicks off concurrent, Concurrent_OFF -> (Concurrent_INIT or INIT Complete), while the expanding thread is in middle of heapReconfigured. With the original ordering of heapReconfigured, we first attempt to set the mark bits in place when Concurrent is ON. With Concurrent_OFF, we delay setting the bits until Concurrent_INIT. This requires update to the init table. Hence, for Concurrent_OFF we forgo setting bits and update the init table, we will expect `tuneToHeap` to do `determineInitRanges` to update init ranges table. The issue occurs when we don't set mark bits in place (given concurrent_OFF) but concurrent starts after the check and prior to updating the init ranges. Here,we either don't update init table (since init is in progress) or miss to update it in time. With these changes of reordering heapReonfig, we will try to set mark bits in place only after check to update init range table. With this, any state transitions resulting in init table not being updated (or being updated to late) will be caught and accounted for as bits will be set after. Signed-off-by: Salman Rana <salman.rana@ibm.com>
- Loading branch information