RFR 8185103: TestThreadDumpMonitorContention.java crashed due to SIGSEGV in G1SATBCardTableModRefBS::write_ref_field_pre_work

George Triantafillou george.triantafillou at oracle.com
Thu Aug 3 18:00:15 UTC 2017


Hi Harold,

Looks good.

-George

On 8/3/2017 9:03 AM, harold seigel wrote:
> Hi,
>
> Please review this JDK-10 fix for JDK-8185103.  The problem occurred  
> because classes were being put on the fixup_module_field_list before 
> their mirror field was set.  If a (different) thread called method 
> patch_javabase_entries() before the class's mirror field was set then 
> this would cause a SIGSEGV because patch_javabase_entries() eventually 
> calls obj_field_put() which tries to dereference the class's mirror 
> field.
>
> This change fixes the problem by setting the class's mirror field 
> before putting the class on the fixup_module_field_list.
>
> Open Webrev: 
> http://cr.openjdk.java.net/~hseigel/bug_8185103/webrev/index.html
>
> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8185103
>
> The fix was tested with the JCK Lang and VM tests, the JTreg hotspot, 
> java/io, java/lang, java/util and other tests, the co-located NSK 
> tests, and with JPRT.
>
> Additionally, the fix was tested by temporarily adding a 
> naked_short_sleep(50) to method initialize_mirror_fields() shortly 
> after it put a class on the fixup_module_field_list.  The sleep was 
> added in order to enhance the likelihood of patch_javabase_entries() 
> being called before the class's mirror field got set.  Without the 
> fix, the TestThreadDumpMonitorContent.java test and the test reported 
> in JDK-8183309 <https://bugs.openjdk.java.net/browse/JDK-8183309> 
> reliably got the reported SIGSEGVs.  With the fix, the tests passed.
>
> Thanks, Harold
>



More information about the hotspot-runtime-dev mailing list