Skip to content

Native Call That Crashed JVM

Johannes Rudolph edited this page May 26, 2016 · 1 revision

summary how to find native call that crashes your jvm

Native Call Crashes JVM

follow these steps to find which of your native JNI calls crashes JVM:

  1. barchart-udt build comes with [SampleLinkerMap liker map] stored inside the jar; find the map that matches your current platform.

  2. inside [SampleJvmCrashLog jvm crash log] look for Problematic frame call offset:

...
# Problematic frame:
# C  [SocketUDT-windows-x86-32.dll+0x24d28]
...

note call offset = 0x24d28

  1. inside [SampleJvmCrashLog jvm crash log] look for Dynamic libraries base address:
Dynamic libraries:
...
      0x76bf0000 - 0x76bfb000 	C:\WINDOWS\system32\PSAPI.DLL
      0x6d8a0000 - 0x6d8af000 	C:\Program Files\Java\jdk1.6.0_14\jre\bin\zip.dll
   -> 0x70e40000 - 0x71273000 	C:\user1\workspace\workspace-barchart-3.5\barchart-udt4\lib\bin\SocketUDT-windows-x86-32.dll
      0x77c10000 - 0x77c68000 	C:\WINDOWS\system32\msvcrt.dll
      0x71ab0000 - 0x71ac7000 	C:\WINDOWS\system32\WS2_32.DLL
...

note library base = 0x70e40000

  1. calculate call address:
entry point =  base address + call offset
0x70e64d28 = 0x70e40000 + 0x24d28

note call address = 0x70e64d28

  1. look through [SampleLinkerMap liker map] and find address range around your calculated call address:
                0x70e62df0                Java_com_barchart_udt_SocketUDT_bind0@12
                0x70e62f90                Java_com_barchart_udt_SocketUDT_close0@8
   start   ->   0x70e64d20                Java_com_barchart_udt_SocketUDT_testCrashJVM0@8
   finish  ->   0x70e656f0                Java_com_barchart_udt_SocketUDT_selectEx1@24
                0x70e64b70                Java_com_barchart_udt_SocketUDT_testGetSetArray0@16

note:


// location of a crash:
start      <= crash      <= finish
0x70e64d20 <= 0x70e64d28 <= 0x70e656f0

// hence crashed in the following call:
0x70e64d20                Java_com_barchart_udt_SocketUDT_testCrashJVM0@8