RFR: 8222334: java -Xss0 triggers StackOverflowError

Patrick Zhang OS patrick at os.amperecomputing.com
Fri Apr 12 07:51:09 UTC 2019

Moved this to core-libs-dev for review, thanks.

Dropped and bcc'ed jdk-dev and jdk-updates-dev.


-----Original Message-----
From: David Holmes <david.holmes at oracle.com> 
Sent: Friday, April 12, 2019 3:43 PM
To: Patrick Zhang OS <patrick at os.amperecomputing.com>; jdk-dev at openjdk.java.net
Cc: jdk-updates-dev at openjdk.java.net
Subject: Re: RFR: 8222334: java -Xss0 triggers StackOverflowError

Hi Patrick,

Please takes this to core-libs-dev for review.


On 12/04/2019 5:24 pm, Patrick Zhang OS wrote:
> Hi,
> Please review this patch.
> The problem is that the launcher does a check on the input -Xss and 
> ensure it >=64K for the initial thread, while vm has another function 
> to determine whether the input stack size is big enough to future 
> threads, such as cgc_thread, vm_thread, java_thead etc. However if 
> -Xss0, the initial thread is created with stack size 64K, while others 
> use hotspot/system default sizes, which would trigger 
> StackOverflowError. We could either fine tune the threshold 64K to be 
> a bigger one, or have the initial thread created with system defaults 
> that may be what the user expects. This patch chooses the second 
> solution, to avoid potential side-effect of the first.
> This can be reproduced with 10, 11, 12 too, so I cc'ed jdk-updates-dev here.
> More details please refer to the ticket.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8222334
> Webrev: http://cr.openjdk.java.net/~qpzhang/8222334/webrev.01/
> Thanks for David's comments in Jira.
> Regards
> Patrick

More information about the core-libs-dev mailing list