Locating the point of failure
If a stack trace is present, examining the function running at the point of failure should give you a good indication of the code that caused the failure, and whether the failure is in the IBM® JVM code, or is caused by application or vendor-supplied JNI code.
- A stack overflow of the native AIX® stack.
- Java™ code is running (either JIT compiled or interpreted)
A failing instruction reported by dbx as stwu
indicates
that there might have been a stack overflow. For example:
Segmentation fault in strlen at 0xd01733a0 ($t1)
0xd01733a0 (strlen+0x08) 88ac0000 stwu r1,-80(r1)
thread
info
and looking at the stack pointer, stack limit, and stack
base values for the current thread. If the value of the stack pointer
is close to that of the stack base, you might have had a stack overflow.
A stack overflow occurs because the stack on AIX grows from the stack limit downwards, towards
the stack base. If the problem is a native stack overflow, you can
solve the overflow by increasing the size of the native stack from
the default size of 400K using the command-line option -Xss<size>.
Check for a stack overflow, regardless of the failing instruction.
To reduce the possibility of a JVM crash, you must set an appropriate
native stack size when you run a Java program
using a lot of native stack. (dbx) thread info 1
thread state-k wchan state-u k-tid mode held scope function
>$t1 run running 85965 k no sys oflow
general:
pthread addr = 0x302027e8 size = 0x22c
vp addr = 0x302057e4 size = 0x294
thread errno = 0
start pc = 0x10001120
joinable = yes
pthread_t = 1
scheduler:
kernel =
user = 1 (other)
event :
event = 0x0
cancel = enabled, deferred, not pending
stack storage:
base = 0x2df23000
size = 0x1fff7b0
limit = 0x2ff227b0
sp = 0x2df2cc70
For the second cause, dbx does not understand the structure of the JIT and Interpreter stack frames, and is not capable of generating a stack trace from them. The Javadump, however, does not suffer from this limitation and can be used to examine the stack trace. A failure in JIT-compiled code can be verified and examined using the JIT problem determination guidance, see Diagnosing a JIT or AOT problem in the J9 VM reference.