![]() ![]() These are adjustable and can be raised to provide more room on the stacks to prevent an overflow. One is for Java code for method calls, and the other is for native C code (on Solaris and HP-UX, only the native stack is utilized). Be careful to not exhaust your physical and heap memory resources.įor every Java thread, there are two stacks that are utilized. Doubling the stack size is suggested as a first step however, every thread that the JVM creates will consume memory. If this does not work, you can adjust the stack sizes. To resolve, increase the native stack size (usually by adjusting the operating system limit for stack size) to accommodate the recursive native calls however, identifying the recursive native calls will help determine the root cause of the stack overflow.Īdjusting the Stack Sizes (Xss and Xmso) options 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. ![]() 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. ![]()
0 Comments
Leave a Reply. |