WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Code review request: three native memory tracking related bugs

Re: Code review request: three native memory tracking related bugs

by Karen Kinnear :: Rate this Message:

| View in Thread

Zhengyu,

Thank you for the updates. A couple of comments below:
On Jul 16, 2012, at 1:31 PM, Zhengyu Gu wrote:

> Thank you for reviewing. Followings are updated webrevs based on the comments
>
> http://cr.openjdk.java.net/~zgu/7181989/webrev.01/
Looks good.

> http://cr.openjdk.java.net/~zgu/7181986/webrev.01/
  Still looking at.
     
>
> http://cr.openjdk.java.net/~zgu/7182543/webrev.01/ 
   Looks good. Thank you for the changes.
    If you do another round to fix any bugs could you possibly change:
   memTracker.cpp:
     line 372 "to stop it while it happens" to "ensure no threads at safepoint create
     new records while the records are being gathered and the sequence number is changing"

    line 512/513 change "wait until" to "try at a later sync point to ensure"

thanks,
Karen

>
>
> Thanks,

>
> -Zhengyu
>
> On 7/13/2012 3:43 PM, Zhengyu Gu wrote:
>> 7181989: NMT ON: Assertion failure when NMT checks thread's native
>> CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181989
>> Webrev: http://cr.openjdk.java.net/~zgu/7181989/webrev.00/
>>
>> We try to assert Thread's stack base to ensure that Thread::record_stack_base_and_size() to record native stack to NMT, but there is scenario that the thread fails to start, which no native stack is created and should not be asserted.
>>
>> 7181986: NMT ON: Assertion failure when running jdi ExpiredRequestDeletionTest
>> CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181986
>> Webrev: http://cr.openjdk.java.net/~zgu/7181986/webrev.00/
>>
>> This is a racing condition when C/C++ runtime exit handler is ran
>> before NMT worker thread exits. The exit handler calls _query_lock's
>> destructor while NMT worker thread is still holding it. The fix is to
>> make _query_lock a heap object, instead of static object, but the
>> drawback is that, it does not seem that _query_lock can be safely deleted.
>>
>> Also, I reassigned MemSnaphot lock and query lock, so they participate in the deadlock detection logic.
>>
>> 7182543: NMT ON: Aggregate a few NMT related bugs
>> CRhttp://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7182543
>> Webrev: http://cr.openjdk.java.net/~zgu/7182543/webrev.00/
>>
>> - Fixed generations_in_used calculation
>> - Wait MemRecorder instance count to drop to zero before completely shutdown NMT
>> - Added assertion for JavaThread in _thread_blocked state.
>>
>>
>> Thanks,
>>
>> -Zhengyu
>>

 « Return to Thread: Code review request: three native memory tracking related bugs