[9] RFR(S): 8065740: compiler/codecache/OverflowCodeCacheTest.java fails with SIGSEGV
Tobias Hartmann
tobias.hartmann at oracle.com
Wed Nov 26 06:48:36 UTC 2014
Albert, Igor, thanks for the review.
On 25.11.2014 16:22, Igor Ignatyev wrote:
> Hi Tobias,
>
> isn't it another manifestation of JDK-8064669[1,2] ?
Yes, I missed that. I'll close the bug as a duplicate.
Since you didn't push yet, could you add the two code cleanups (typo in
whitebox.cpp and removal of comment in sweeper.cpp) to your change?
Thanks,
Tobias
>
> [1] https://jbs.oracle.com/bugs/browse/JDK-8064669
> [2]
> http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2014-November/016283.html
>
>
> Igor
>
> On 11/25/2014 05:58 PM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8065740
>> Webrev: http://cr.openjdk.java.net/~thartmann/8065740/webrev.00/
>>
>> Problem:
>> The test allocates CodeBlobs in the code cache by using the Whitebox API method
>> 'WhiteBox::allocate_code_blob' introduced by JDK-8059624. The VM crashes while
>> sweeping because it encounters an allocated but uninitialized CodeBlob in the
>> code cache (crash happens in NMethodIterator::next_method because we call
>> '_code_blob->is_nmethod()' on an uninitialised CodeBlob).
>> The problem is that 'WhiteBox::allocate_code_blob' gives up the CodeCache_lock
>> before initializing the CodeBlob. This allows the sweeper thread to encounter a
>> yet uninitialized CodeBlob while iterating over the code cache.
>>
>> Solution:
>> I moved the initialization of the CodeBlob into the scope of the CodeCache_lock.
>> I also fixed some typos and removed a comment that became meaningless with
>> JDK-8046809.
>>
>> Testing:
>> - Failing testcase
>> - JPRT
>>
>> Thanks,
>> Tobias
>>
More information about the hotspot-compiler-dev
mailing list