Bug: String deduplication misses code roots?

Zhengyu Gu zgu at redhat.com
Mon Feb 19 22:06:24 UTC 2018


Hi Aleksey,

I still could not reproduce this.

But there does have a race in ShenandoahStrDedupThread::poll() method, 
where it does not participate safepoints, so it can interfere with root 
scanning.

As you suggested, added simple version of oops_do() for verification.

Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/strdedup_poll/webrev.00/

Test:
   hotspot_gc_shenandoah (fastdebug + release)
   specjvm with -XX:+UseStringDedupliction -XX:+UseShenandoahGC


Thanks,

-Zhengyu



On 02/14/2018 05:06 AM, Aleksey Shipilev wrote:
> Hey Zhengyu,
> 
> New asserts capture this in ShenandoahStrDedupStress:
>   http://cr.openjdk.java.net/~shade/shenandoah/strdedup-coderoot-hs_err.log
> 
> It seems we have unmarked byte array in a code root:
> 
> #  Internal Error
> (/home/shade/trunks/shenandoah-jdk10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp:808),
> pid=65297, tid=65312
> #  Error: Shenandoah assert: Object should be marked (complete)
> 
> Referenced from:
>    interior location: 0x000014855e8c2db2
>    outside of Java heap
>    0x000014855e8c2db2 is at entry_point+210 in (nmethod*)0x000014855e8c2a10
> 
> 
> Object:
>    0x00000000c0020aa8 - klass 0x00000001000007b0 [B
>      not allocated after complete mark start
>          allocated after next mark start
>      not marked complete
>          marked next
>          in collection set
>    region: |0x000014857006c0c0|    0|CS |BTE 0x00000000c0000000, 0x00000000c0080000,
> 0x00000000c0080000|U 100%|T  62%|G  37%|S   0%|L  37%|FTS           85728|LTS           85898| |CP
> 0|TAMS 0x00000000c0080000, 0x00000000c0000000|
> 
> Forwardee:
>    (the object itself)
> 
> Thanks,
> -Aleksey
> 


More information about the shenandoah-dev mailing list