RFR(M): 8169373: Work around linux NPTL stack guard error.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Mon Nov 14 17:12:48 UTC 2016

Hi David, 

> Did you really intend to increase the real minimum stack from 128K to
> 256K ? (on a 64K page system)
I finally figured why I have to set such high minimum values.

A CompilerThread is a JavaThread. It's getting yellow, red etc
pages at the top. As these are 64K on 64K systems, the compiler
thread stack has to be this big. Thus you actually need similar 
values once you run a linuxx86_64 VM on a system with 64K pages.
Does this exist?

But, this means that there is no use of the OS guard pages 
configured in default_guard_size().  This is called with 'compiler_thread'
for CompilerThreads.

We should probably also return '0' in that case.

What do you think?

Best regards,

size_t os::Linux::default_guard_size(os::ThreadType thr_type) {
  // Creating guard page is very expensive. Java thread has HotSpot
  // guard page, only enable glibc guard page for non-Java threads.
  return (thr_type == java_thread ? 0 : page_size());

More information about the hotspot-runtime-dev mailing list