
System cores can be used to identify long and possibly recursively looping native thread stacks. It is almost guaranteed that a crash will occur if the native stack runs out of space. Debugging HotSpot failures on the Solaris and HP-UX operating environment.JIT Problem Determination for IBM SDK 5.0 and 6.0 using -Xjit.

#Java stack overflow error example how to#
The documents linked below explain how to debug JIT and HotSpot compiler issues: This can speed up execution time, but as more aggressive optimizations are used, this can inadvertently cause recursion, resulting in stack overflow or crash. The JIT/HotSpot compiler (JIT) is designed to speed up the JVM execution times by compiling method calls. This is especially true if the stack appears to repeat (such as recursive method calls). However if the recursion continues to trigger a stack overflow, the next step is to identify what code is causing the recursion from javacores, thread dumps, or even system core files.Ī thread stack that indicates it's too large to display can be an indicator of stack overflow. Increasing the thread stack size allows for larger thread stacks. JSP or servlets calling itself (usually by executing forward or include to itself) Very large XML documents loaded into the Document Object Model (DOM)

Ěn infinite loop that continuously spawns off threads

Large thread stacks that appear to repeat The thread stack has a limited size and eventually its space will run out as the thread stack grows without bounds. If an application is performing recursion, the maximum stack size can easily be reached and a Stack Overflow exception is thrown.
