RFR: 8170307: Stack size option -Xss is ignored

dean.long at oracle.com dean.long at oracle.com
Tue Nov 29 06:59:27 UTC 2016

On 11/28/16 1:25 PM, David Holmes wrote:

> Hi Dean,
> On 29/11/2016 6:01 AM, dean.long at oracle.com wrote:
>> Hi David,
>> On 11/25/16 2:38 AM, David Holmes wrote:
>>> However, the stack size limitations remained in place in case the VM
>>> was launched from the primordial thread of a user application via the
>>> JNI invocation API.
>> why is the JNI invocation API no longer a problem?  Does it create a new
>> thread like the launcher?
> No, the JNI invocation API is unchanged. What has changed now are the 
> conditions that required the 2MB limit due to the behaviour of the 
> thread library (this goes back to LinuxThreads and the IA64 port).

Let me see if I have it straight.  The stack size limit was needed for 
the primordial thread on LinuxThreads (I remember those days!). We can 
still start the JVM on the primordial thread if we use a custom launcher 
or the JNI invocation API, but we no longer need the 2MB limit because 
we no longer support LinuxThreads.

Based on the comment in os::Linux::capture_initial_stack, I'd also like 
to know if pthread_getattr_np() is now reliable on the primordial 
thread.  If so, we could remove a lot of ugly code.


> Thanks,
> David
>> dl

More information about the hotspot-dev mailing list