Issue: An irrecoverable stack overflow has occurred.

Issue:

An irrecoverable stack overflow has occurred. Please check if any of your loaded .so files has enabled executable stack (see man page execstack(8))

Reason:

This issue happens when I call a c++ So lib from java by JNA. This mostly caused by input a big chunk of data into the function interface of the C++ function. There is a limit of the Thread Stack Size defined for java’s thread. Normally is 512K-1024K.

 

And by change the Xss size you could change the stack size. but you should be careful on this when you have many threads need to open.

 

 

Refer http://xmlandmore.blogspot.com/2014/09/jdk-8-thread-stack-size-tuning.html