String-dedup test failures

Roman Kennke rkennke at redhat.com
Thu Nov 16 13:51:43 UTC 2017


You either need to mark all the stuff in the strdeduptable and thus keep 
everything (normal phases), or not mark it (i.e. treat weakly) and clean 
up unreachable stuff *after marking* (cleanup phases). This is very 
similar to how we treat unload classes and similar stuff. Never should 
you keep unreachable stuff in the strdedup-table (I think this is what 
causes the issues that we see).

Roman
> Thought about overnight, it makes sense to treat it as weak root and 
> deal with it the same way as other weak roots.
>
> -Zhengyu
>
> On 11/16/2017 04:34 AM, Aleksey Shipilev wrote:
>> On 11/16/2017 10:25 AM, Roman Kennke wrote:
>>> I think we need to clean up the string dedup table *after marking*. 
>>> If a byte[] is not reachable
>>> after marking, we need to clean all references to it, because *it 
>>> may become trashed* during evac.
>>> If we want to keep it alive, then we need to mark it. Evac'ing an 
>>> unmarked byte[] after marking is
>>> calling for troubles, because we probably access a pointer that is 
>>> about to be invalidated.
>>
>> Yes, that's what I was suggesting:
>>
>> It seems that we want two separate modes: regular, and cleanup. Much 
>> like we do with "Parallel
>> Cleanup" during Final Mark. In regular mode, we mark all StrDedup 
>> entries always, maybe even
>> concurrently during mark? In cleanup mode, we don't mark StrDedup as 
>> roots, but at Final Mark we
>> purge all stale entries from there. Then if any String cannot 
>> "revive" the stale unmarked entry, and
>> have to insert new, reachable one. I think the mechanism above has 
>> the nice symmetry with class
>> unloading, etc., which makes it easier to reason about. Also makes 
>> cleanup during pause optional.
>>
>> -Aleksey
>>



More information about the shenandoah-dev mailing list