MPS issue job004022

TitleMutator is suspended while the foundation is discovered
Assigned userRichard Brooksby
DescriptionAlthough branch/2016-04-14/no-condemn-suspend has allowed condemn to be incremental, mutator allocation during or after the foundation is discovered in TraceStart is unsafe, because the grey list is not incrementally maintained for unflipped traces.
AnalysisThe foundation is discovered in TraceStart by testing the intersection of segment summaries with the approximation to the condemned set. If a segment summary is changed by a mutator write during of after this phase it does not update whether the segment is on the grey list, breaking the tree-colour invariant.
For this reason, we must still suspend the mutator at the start of discovering the foundation, and not resume it until after flip.
This can probably be improved by two things:
1. SegSetSummary could add a segment to the grey list when it comes to overlap the condemned set of any unflipped trace. (Note that the purpose of scanning a segment is to ensure that this overlap is empty and that's how we remove segments from the grey list.)
2. Pools allocating objects containing references outside condemned segments should ensure those segments are grey for any unflipped traces.
See also job004023 concerning pre-flip maintenance of the write barrier.
How foundinspection
EvidenceDiscovered while working on branch/2016-04-14/no-condemn-suspend.
Created byRichard Brooksby
Created on2016-04-27 16:12:50
Last modified byRichard Brooksby
Last modified on2016-04-28 12:07:39
History2016-04-27 RB Created.