RFR(xs): 8202772: NMT erroneously assumes thread stack boundaries to be page aligned

Zhengyu Gu zgu at redhat.com
Tue Jun 12 13:11:24 UTC 2018


Hi Thomas,

Looks fine as temporarily solution.

On 06/12/2018 12:59 AM, Thomas Stüfe wrote:
> Dear all,
> 
> may I please have reviews for this fix, which - for now - disables
> thread stack tracking for NMT on AIX.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8202772
> Webrev: http://cr.openjdk.java.net/~stuefe/webrevs/8202772-NMT-erroneously-assumes-thread-stack-boundaries-to-be-page-aligned/webrev.00/webrev/
> 
> On AIX, we have two problems:
> 
> - NMT assumes stack boundaries to be page aligned. This is wrong but
> on all platforms other than AIX does not matter.
Because of this :-)

        The address specified in stackaddr should be suitably aligned: for
        full portability, align it on a page boundary
        (sysconf(_SC_PAGESIZE)).  posix_memalign(3) may be useful for
        allocation.  Probably, stacksize should also be a multiple of the
        system page size.

> - the way mincore() is used to read residency of pages needs to be
> adapted since on AIX, os::vm_page_size() is not necessarily the page
> size used by mincore() - which is quite dangerous.

I did some digging, seems that AIX has two different type of pages. So 
which one will sysconf(_SC_PAGESIZE) return? If uses mincore to walk a 
memory space, it can potential report bit vector in different page 
sizes? which sounds contradicting to AIX mincore API document ?

https://www.ibm.com/support/knowledgecenter/en/ssw_aix_71/com.ibm.aix.basetrf1/mincore.htm


Thanks,

-Zhengyu



> 
> Since JDK-8204552 was added to deal with the first point, it makes
> sense to wait until that issue is finished. Until then, I'd like to
> disable thread stack recognition in NMT for AIX. We can revisit this
> topic again once we can spare time for it and JDK-8204552 has been
> done.
> 


More information about the hotspot-runtime-dev mailing list