RFR: 8170307: Stack size option -Xss is ignored

David Holmes david.holmes at oracle.com
Tue Nov 29 09:20:26 UTC 2016


On 29/11/2016 4:59 PM, dean.long at oracle.com wrote:
> 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.

Yes. There were some other reasons why the 2MB limit was needed but 
those no longer exist either (ie ia64 port, alt-stack usage)

> 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.

I expect that it would be, but that would require a lot more extensive 
testing of different Linuxes. This can be done as part of planned future 
cleanup work in 10.

Thanks,
David

> dl
>
>
>> Thanks,
>> David
>>
>>> dl
>


More information about the hotspot-dev mailing list