RFR: 8016074 NMT: assertion failed: assert(thread->thread_state() == from) failed: coming from wrong thread state

harold seigel harold.seigel at oracle.com
Wed Jul 3 04:52:55 PDT 2013


It looks good to me also, other than some spelling errors in the 
comments:  JavaTherad *implementatioins*

Harold

On 7/3/2013 7:42 AM, Coleen Phillimore wrote:
>
> This looks good.
> Coleen
>
> On 7/3/2013 7:32 AM, Zhengyu Gu wrote:
>> Solaris os::yield_all() implementation depends on os::sleep(), which 
>> requires JavaThread to be in _thread_in_vm state. As NMT tracking 
>> call can originate from any thread in any state, transits to 
>> _thread_in_vm can be dangerous, if caller holds any locks, deadlock 
>> or lock out of order can result, since state transition code may 
>> block on Threads_lock.
>>
>> The solution is to use os::NakedYield() which calls to system 
>> thr_yield().
>>
>> On Linux and BSD, os::yield_all() and os::NakedYield() 
>> implementations are the same.
>>
>> On Windows, the implementations are different, based on our QA 
>> feedback, os::NakedYield() does not perform as well as os::yield_all().
>>
>>
>> External bug:http://bugs.sun.com/view_bug.do?bug_id=8016074
>> JBS:https://jbs.oracle.com/bugs/browse/JDK-8016074
>> Webrev:http://cr.openjdk.java.net/~zgu/8016074/webrev.00/
>>
>>
>> Tests:
>>   - JPRT with -XX:-AutoShutdownNMT flag
>>   - Kitchensink on Solaris 11, with -XX:NativeMemoryTracking=detail 
>> -XX:-AutoShutdownNMT -XX:+SafepointALot
>>     over 12 hours now.
>>
>>
>> Thanks,
>>
>> -Zhengyu
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130703/f88f3790/attachment.html 


More information about the hotspot-runtime-dev mailing list