10 Replies Latest reply on Oct 31, 2012 2:27 AM by 795131

    JVM Crashing in ParallelGC at AIX

      We use JNI_CreateJavaVM to start an JVM from C. And in this JVM we use "LocateRegistry.createRegistry(JMXPORT);" to create registry. But the JVM always crash at Solaris with JDK1.6 ( It works fine with JDK1.5). The crash happens at the process of ParallelGC. It works fine with SerialGC.

      I can work around the crashing by add -XX:+UseSerialGC to change the GC method. But i need to know the root cause. It will be very appreciated for any help. Thanks.

      # A fatal error has been detected by the Java Runtime Environment:
      # SIGFPE (0x8) at pc=0xfffffd7ff0f2b898, pid=28894, tid=4
      # JRE version: 6.0_37-b06
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.12-b01 mixed mode solaris-amd64 compressed oops)
      # Problematic frame:
      # V [libjvm.so+0x46b898] JVM_GetCPClassNameUTF+0x94c8
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp

      --------------- T H R E A D ---------------

      Current thread (0x000000000081b800): VMThread [stack: 0xfffffd7ffe6af000,0xfffffd7ffe7af000] [id=4]

      siginfo:si_signo=SIGFPE: si_errno=0, si_code=4 (FPE_FLTOVF), si_addr=0xfffffd7ff0f2b898

      RAX=0x0000000000469f60, RBX=0x0000000000000000, RCX=0x0000000000461a60, RDX=0x0000000000880000
      RSP=0xfffffd7ffe7ae6a0, RBP=0xfffffd7ffe7ae6d0, RSI=0x0000000003300000, RDI=0x0000000000475500
      R8 =0x000000000046c860, R9 =0xfffffd7ffee52490, R10=0x0000000000461b00, R11=0x00000000f9380000
      R12=0x0000000000475500, R13=0xfffffd7ff1272fd0, R14=0x0000000000475d30, R15=0x00000000000cc010
      RIP=0xfffffd7ff0f2b898, RFLAGS=0x0000000000010246

      Top of Stack: (sp=0xfffffd7ffe7ae6a0)
      0xfffffd7ffe7ae6a0: fffffd7ff199af30 000000000046c2e0
      0xfffffd7ffe7ae6b0: 0000000000475500 0000000000000000
      0xfffffd7ffe7ae6c0: fffffd7ffe7ae6f0 408f4000447a0000
      0xfffffd7ffe7ae6d0: fffffd7ffe7ae710 fffffd7ff0f2b8e7
      0xfffffd7ffe7ae6e0: fffffd7ff199af30 000000000046c2e0
      0xfffffd7ffe7ae6f0: 00000000004623c0 fffffd7ff0f37d99
      0xfffffd7ffe7ae700: 00000000000cc010 fffffd7ff199af30
      0xfffffd7ffe7ae710: fffffd7ffe7ae720 fffffd7ff0f2b5da
      0xfffffd7ffe7ae720: fffffd7ffe7ae9c0 fffffd7ff1680c44
      0xfffffd7ffe7ae730: 0000000000461970 000000000046c2e0
      0xfffffd7ffe7ae740: fffffd7ff1999388 fffffd7ff19a16e8
      0xfffffd7ffe7ae750: 0000000000000000 000000000081cb70
      0xfffffd7ffe7ae760: 0000000000000000 000000001ecf66a6
      0xfffffd7ffe7ae770: 000000001f257d23 0000000000000000
      0xfffffd7ffe7ae780: 0000000000000000 0000000000000000
      0xfffffd7ffe7ae790: 0000000000000000 0000000000000000
      0xfffffd7ffe7ae7a0: fffffd7ffe7ae878 00000000004a6530
      0xfffffd7ffe7ae7b0: 0000000000000001 0000000000000000
      0xfffffd7ffe7ae7c0: fffffd7ffe7ae7d0 fffffd7ff0e6fc92
      0xfffffd7ffe7ae7d0: 0000000000517da0 00000000004a6520
      0xfffffd7ffe7ae7e0: 00000000004a6530 00000000004a6908
      0xfffffd7ffe7ae7f0: 000000000081b800 000000000047b280
      0xfffffd7ffe7ae800: 000000000081bf10 000000000081bf20
      0xfffffd7ffe7ae810: 000000000081c2f8 fffffd7ffe7aebb8
      0xfffffd7ffe7ae820: fffffd7ff1990100 0000000000000000
      0xfffffd7ffe7ae830: 0000000000000000 0000000000000000
      0xfffffd7ffe7ae840: 000000000045e450 fffffd7ff9c77300
      0xfffffd7ffe7ae850: fffffd7ffe010100 0000000000000000
      0xfffffd7ffe7ae860: fffffd7ffe7ae8a0 fffffd7ff0f7cf00
      0xfffffd7ffe7ae870: 00000000004a6530 000000000045e450
      0xfffffd7ffe7ae880: 0000000000000000 000000001ed00a99
      0xfffffd7ffe7ae890: 0000000000000001 0000000000476c80

      Instructions: (pc=0xfffffd7ff0f2b898)
      0xfffffd7ff0f2b878: 2c c0 4d 8b 4e 28 4d 89 01 4d 8b b4 24 08 01 00
      0xfffffd7ff0f2b888: 00 49 8b fc 33 c0 41 ff d5 4c 8b 80 98 00 00 00
      0xfffffd7ff0f2b898: f2 41 0f 5a 40 28 f3 0f 59 45 f8 f3 4c 0f 2c c0
      0xfffffd7ff0f2b8a8: 4d 8b 4e 28 4d 89 01 41 5e 41 5d 41 5c c9 c3 00

      Register to memory mapping:

      RAX=0x0000000000469f60 is an unknown value
      RBX=0x0000000000000000 is an unknown value
      RCX=0x0000000000461a60 is an unknown value
      RDX=0x0000000000880000 is an unknown value
      RSP=0xfffffd7ffe7ae6a0 is an unknown value
      RBP=0xfffffd7ffe7ae6d0 is an unknown value
      RSI=0x0000000003300000 is an unknown value
      RDI=0x0000000000475500 is an unknown value
      R8 =0x000000000046c860 is an unknown value
      R9 =0xfffffd7ffee52490 is an unknown value
      R10=0x0000000000461b00 is an unknown value
      R11=0x00000000f9380000 is an unknown value
      R12=0x0000000000475500 is an unknown value
      R13=0xfffffd7ff1272fd0: JVM_SupportsCX8+0x219000 in /****/bin/jdk1.6.0_37/jre/lib/amd64/server/libjvm.so at 0xfffffd7ff0ac0000
      R14=0x0000000000475d30 is an unknown value
      R15=0x00000000000cc010 is an unknown value

      Stack: [0xfffffd7ffe6af000,0xfffffd7ffe7af000], sp=0xfffffd7ffe7ae6a0, free space=1021k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x46b898] JVM_GetCPClassNameUTF+0x94c8
      V [libjvm.so+0x46b8e7] JVM_GetCPClassNameUTF+0x9517
      V [libjvm.so+0x46b5da] JVM_GetCPClassNameUTF+0x920a
      V [libjvm.so+0xbc0c44] sysThreadAvailableStackWithSlack+0x3a384
      V [libjvm.so+0xbb3986] sysThreadAvailableStackWithSlack+0x2d0c6
      V [libjvm.so+0x531398] JVM_IsSameClassPackage+0x2eb8
      V [libjvm.so+0x472384] JVM_GetCPClassNameUTF+0xffb4
      V [libjvm.so+0x4725fa] JVM_GetCPClassNameUTF+0x1022a
      V [libjvm.so+0x5ad0a0] JVM_SupportsCX8+0x130d0
      V [libjvm.so+0x5ac55f] JVM_SupportsCX8+0x1258f
      V [libjvm.so+0xb7f469] JVM_RaiseSignal+0x1c8509
      C [libc.so.1+0x1149d4] thrpsetup+0xbc
      C [libc.so.1+0x114ca0] lwpstart+0x0

      VM_Operation (0xfffffd7ffd58b7a0): ParallelGCSystemGC, mode: safepoint, requested by thread 0x0000000000bba800

      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
      0x0000000000c4d800 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=23, stack(0xfffffd7ffd0ff000,0xfffffd7ffd1ff000)]
      0x0000000000b7d000 JavaThread "RMI RenewClean-[]" daemon [_thread_blocked, id=22, stack(0xfffffd7ffd28a000,0xfffffd7ffd38a000)]
      0x0000000000ccd000 JavaThread "RMI TCP Connection(1)-" daemon [_thread_in_native, id=21, stack(0xfffffd7ffd38b000,0xfffffd7ffd48b000)]
      0x0000000000bba800 JavaThread "GC Daemon" daemon [_thread_blocked, id=20, stack(0xfffffd7ffd48c000,0xfffffd7ffd58c000)]
      0x0000000000bb9000 JavaThread "RMI Reaper" [_thread_blocked, id=19, stack(0xfffffd7ffd58d000,0xfffffd7ffd68d000)]
      0x0000000000bb6800 JavaThread "RMI TCP Accept-0" daemon [_thread_blocked, id=18, stack(0xfffffd7ffd68e000,0xfffffd7ffd78e000)]
      0x0000000000bb5800 JavaThread "Timer-0" [_thread_blocked, id=17, stack(0xfffffd7ffd78f000,0xfffffd7ffd88f000)]
      0x0000000000c0e000 JavaThread "RMI TCP Accept-26999" daemon [_thread_in_native, id=14, stack(0xfffffd7ffd96f000,0xfffffd7ffda6f000)]
      0x000000000086b800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=12, stack(0xfffffd7ffdea7000,0xfffffd7ffdfa7000)]
      0x0000000000868800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=11, stack(0xfffffd7ffdfa8000,0xfffffd7ffe0a8000)]
      0x0000000000865800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=10, stack(0xfffffd7ffe0a9000,0xfffffd7ffe1a9000)]
      0x000000000085a000 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=9, stack(0xfffffd7ffe1aa000,0xfffffd7ffe2aa000)]
      0x0000000000855000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_native, id=8, stack(0xfffffd7ffe2ab000,0xfffffd7ffe3ab000)]
      0x0000000000849000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=7, stack(0xfffffd7ffe3ac000,0xfffffd7ffe4ac000)]
      0x0000000000823800 JavaThread "Finalizer" daemon [_thread_blocked, id=6, stack(0xfffffd7ffe4ad000,0xfffffd7ffe5ad000)]
      0x0000000000821800 JavaThread "Reference Handler" daemon [_thread_blocked, id=5, stack(0xfffffd7ffe5ae000,0xfffffd7ffe6ae000)]
      0x0000000000468800 JavaThread "main" [_thread_in_native, id=1, stack(0xfffffd7fff600000,0xfffffd7fffe00000)]

      Other Threads:
      =>0x000000000081b800 VMThread [stack: 0xfffffd7ffe6af000,0xfffffd7ffe7af000] [id=4]
      0x0000000000881000 WatcherThread [stack: 0xfffffd7ffdd3e000,0xfffffd7ffde3e000] [id=13]

      VM state:at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x0000000000467200] Threads_lock - owner thread: 0x000000000081b800
      [0x00000000004677a0] Heap_lock - owner thread: 0x0000000000bba800

      PSYoungGen total 60928K, used 816K [0x00000000f5800000, 0x00000000f9c00000, 0x0000000100000000)
      eden space 52224K, 0% used [0x00000000f5800000,0x00000000f5800000,0x00000000f8b00000)
      from space 8704K, 9% used [0x00000000f8b00000,0x00000000f8bcc010,0x00000000f9380000)
      to space 8704K, 0% used [0x00000000f9380000,0x00000000f9380000,0x00000000f9c00000)
      PSOldGen total 137216K, used 0K [0x00000000e0a00000, 0x00000000e9000000, 0x00000000f5800000)
      object space 137216K, 0% used [0x00000000e0a00000,0x00000000e0a00000,0x00000000e9000000)
      PSPermGen total 22528K, used 9472K [0x00000000db800000, 0x00000000dce00000, 0x00000000e0a00000)
      object space 22528K, 42% used [0x00000000db800000,0x00000000dc1402f8,0x00000000dce00000)

      Code Cache [0xfffffd7ff9c00000, 0xfffffd7ffa000000, 0xfffffd7ffcc00000)
      total_blobs=280 nmethods=35 adapters=207 free_code_cache=49827264 largest_free_block=15680

      Dynamic libraries:
      0x0000000000400000 /****/bin/tlisten
      0xfffffd7fe8fc0000 /****/lib/libgpnet.so.71
      0xfffffd7fe8df0000 /****/lib/libtux.so.71
      0xfffffd7feae10000 /****/lib/libbuft.so.71
      0xfffffd7fe8db0000 /****/lib/libfml.so.71
      0xfffffd7fe8d70000 /****/lib/libfml32.so.71
      0xfffffd7fe9060000 /****/lib/libengine.so.71
      0xfffffd7ffe8cd000 /lib/64/libpthread.so.1
      0xfffffd7ffe8cb000 /lib/64/librt.so.1
      0xfffffd7ffe880000 /lib/64/libsocket.so.1
      0xfffffd7ffe7d0000 /lib/64/libnsl.so.1
      0xfffffd7ffeeb0000 /lib/64/libm.so.2
      0xfffffd7ffdcfc000 /lib/64/libthread.so.1
      0xfffffd7fff110000 /lib/64/libc.so.1
      0xfffffd7feadf0000 /****/lib/libutrace.so.71
      0xfffffd7feadb0000 /****/lib/libgiconv.so.71
      0xfffffd7ffd200000 /usr/lib/64/libCrun.so.1
      0xfffffd7fe8000000 /****/lib/libtmjmx.so
      0xfffffd7ffe8b0000 /lib/64/libmd.so.1
      0xfffffd7ffe7b0000 /lib/64/libmp.so.2
      0xfffffd7ff0ac0000 /****/bin/jdk1.6.0_37/jre/lib/amd64/server/libjvm.so
      0xfffffd7ffde3f000 /usr/lib/64/libsched.so.1
      0xfffffd7ffdcfb000 /lib/64/libdl.so.1
      0xfffffd7ffcdb0000 /lib/64/libm.so.1
      0xfffffd7ffceaf000 /lib/64/libdoor.so.1
      0xfffffd7ffcd70000 /usr/lib/64/libdemangle.so.1
      0xfffffd7fe9000000 /****/lib/registry.so
      0xfffffd7ff0a90000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libverify.so
      0xfffffd7ff0a40000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libjava.so
      0xfffffd7ff0950000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libjdwp.so
      0xfffffd7ff0930000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libnpt.so
      0xfffffd7ff0910000 /usr/lib/iconv/amd64/UTF-8%646.so
      0xfffffd7ff08f0000 /usr/lib/iconv/amd64/646%UTF-8.so
      0xfffffd7ff0a10000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libzip.so
      0xfffffd7ff08d0000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libdt_socket.so
      0xfffffd7fe6bc0000 /****/lib/libtuxjni.so
      0xfffffd7fe8ca0000 /****/lib/libtmib.so.71
      0xfffffd7fe8c10000 /****/lib/libqm.so.71
      0xfffffd7ff09f0000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libj2pkcs11.so
      0xfffffd7ffde60000 /usr/lib/amd64/libpkcs11.so
      0xfffffd7ffdd10000 /lib/64/libcryptoutil.so.1
      0xfffffd7ffdbf0000 /usr/lib/security/64/pkcs11_softtoken.so
      0xfffffd7ffdbb0000 /usr/lib/64/libsoftcrypto.so.1
      0xfffffd7ffdb80000 /lib/64/libgen.so.1
      0xfffffd7ff09c0000 /****/bin/jdk1.6.0_37/jre/lib/amd64/libnet.so
      0xfffffd7fef430000 /****/bin/jdk1.6.0_37/jre/lib/amd64/librmi.so

      VM Arguments:
      jvm_args: -Djava.compiler=NONE -Dmyapp.jmx.auth=tux -Djava.security.policy= -Dmyapp.jmx.accessfile=/****/jmx/jmxaccess.properties -Dmyapp.jmx.addr=rmi://****:26999 -Xms200m -Xmx500m -Dmyapp.tlisten.nlsaddr=//****:27789 -XX:+HeapDumpOnCtrlBreak -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
      java_command: <unknown>
      Launcher Type: generic

      Environment Variables:

      Signal Handlers:
      SIGSEGV: [libjvm.so+0xccfbb0], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGBUS: [libjvm.so+0xccfbb0], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGFPE: [libjvm.so+0x43f880], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGPIPE: [libjvm.so+0x43f880], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGXFSZ: [libjvm.so+0x43f880], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGILL: [libjvm.so+0x43f880], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
      SIGUSR1: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGUSR2: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGQUIT: [libjvm.so+0xb81a00], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
      SIGHUP: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
      SIGTERM: [libjvm.so+0xb81a00], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
      SIG39: [libjvm.so+0xb84870], sa_mask[0]=0x00000000, sa_flags=0x00000008
      SIG40: [libjvm.so+0x43f880], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c

      --------------- S Y S T E M ---------------

      OS: Oracle Solaris 11 Express snv_151a X86
      Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
      Assembled 04 November 2010

      uname:SunOS 5.11 snv_151a i86pc (T2 libthread)
      rlimit: STACK 10240k, CORE infinity, NOFILE 65536, AS infinity
      load average:1.16 1.15 0.84

      CPU:total 2 (32 cores per cpu, 2 threads per core) family 6 model 44 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, ht

      Memory: 4k page, physical 8191612k(1152580k free)

      vm_info: Java HotSpot(TM) 64-Bit Server VM (20.12-b01) for solaris-amd64 JRE (1.6.0_37-b06), built on Sep 24 2012 11:42:33 by "" with Workshop 5.8

      time: Fri Oct 26 09:29:22 2012
      elapsed time: 0 seconds

      And following is the core dump stack trace

      Reading librmi.so
      t@4 (l@4) terminated by signal ABRT (Abort)
      0xfffffd7fff22dd1a: lwpkill+0x000a: jae lwpkill+0x18 [ 0xfffffd7fff22dd28, .+0xe ]
      (dbx) where
      current thread: t@4
      =>[1] lwpkill(0x4, 0x6, 0xffffff02cd0cbc00, 0xfffffd7fff22e54b, 0x0, 0xfffffd7ffe7addc0), at 0xfffffd7fff22dd1a
      [2] thr_kill(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff2224dd
      [3] raise(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1ce9f1
      [4] abort(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff1a41a1
      [5] os::abort(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff16403e4
      [6] VMError::report_and_die(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff178f66a
      [7] JVM_handle_solaris_signal(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0eff703
      [8] signalHandler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0eff88e
      [9] __sighndlr(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff224d66
      [10] call_user_handler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff217a1c
      [11] sigacthandler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff217c43
      ---- called from signal handler with signal 8 (SIGFPE) ------
      [12] GCAdaptivePolicyCounters::update_counters_from_policy(0x475500, 0x3300000, 0x880000, 0x461a60, 0x46c860, 0xfffffd7ffee52490), at 0xfffffd7ff0f2b898
      [13] PSGCAdaptivePolicyCounters::update_counters_from_policy(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0f2b8e7
      [14] PSGCAdaptivePolicyCounters::update_counters(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0f2b5da
      [15] PSScavenge::invoke_no_policy(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff1680c44
      [16] PSMarkSweep::invoke(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff1673986
      [17] VM_ParallelGCSystemGC::doit(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0ff1398
      [18] VM_Operation::evaluate(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0f32384
      [19] VMThread::evaluate_operation(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff0f325fa
      [20] VMThread::loop(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff106d0a0
      [21] VMThread::run(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff106c55f
      [22] java_start(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ff163f469
      [23] thrpsetup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff2249d4
      [24] lwpstart(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff224ca0

      Edited by: geting on Oct 29, 2012 8:16 PM

      Edited by: geting on Oct 29, 2012 8:17 PM

      Edited by: geting on Dec 17, 2012 2:30 PM

      Edited by: geting on Dec 17, 2012 3:57 PM
        • 1. Re: JVM Crashing with JNI and RMI
          It doesn't crash at line 256 of UnicastRemoteObject for anybody else. SIGFPE doesn't have anything to do with RMI. RMI has no JNI component.

          Clearly there is something wrong with your JNI code.
          • 2. Re: JVM Crashing with JNI and RMI
            Almost certainly a problem in your JNI code.

            Is your code C or C++?

            What compiler are you using? If you're using Sun/Oracle Studio compiler on C++ code, compile with "+w2 -xport64" and fix ALL the warnings you see.

            Since you're apparently compiling your code into 64-bit binaries, it wouldn't surprise me if some developer who "knows" that "a pointer is the same as an unsigned int" made that error. The C++ Studio compiler is the best tool I've seen for finding such instances of misguided "brilliance", but unfortunately that only works on C++ code. You should be able to use lint on C code and get similar results. (You do use lint on your C code, right? And you fix the mistakes if finds, right?)

            IMO you should always compile with all warnings enabled, and fix your code to address those warnings. Why? Because the people who wrote whatever compiler that you're using to turn your source code into a binary think the code you wrote that generates the warning has problems - and they know a whole lot more about the way their compiler works and the way code in general is compiled into executable form than you do. So if they think your code is sketchy enough to bother doing the extra work it takes for their compiler to generate a warning when it runs into code like that, they're almost certainly right and your code really is sketchy.
            • 3. Re: JVM Crashing with JNI and RMI
              Thanks for your reply.
              My native code is based on C.
              We use Sun Studio C Compiler. Also all the warning is fixed.
              And i remove the JNI operations which is wrote by me from JAVA code. But the core dump is still happen at the same place.
              Now, here is the case. One Java program is invoked by C using "JNI_CreateJavaVM". In the Java program a RMI server is created.
              Following is all the JNI operation printed by -verbose:jni. I really need your help.

              [Dynamic-linking native method java.lang.Object.registerNatives ... JNI]
              [Registering JNI native method java.lang.Object.hashCode]
              [Registering JNI native method java.lang.Object.wait]
              [Registering JNI native method java.lang.Object.notify]
              [Registering JNI native method java.lang.Object.notifyAll]
              [Registering JNI native method java.lang.Object.clone]
              [Dynamic-linking native method java.lang.System.registerNatives ... JNI]
              [Registering JNI native method java.lang.System.currentTimeMillis]
              [Registering JNI native method java.lang.System.nanoTime]
              [Registering JNI native method java.lang.System.arraycopy]
              [Dynamic-linking native method java.lang.Thread.registerNatives ... JNI]
              [Registering JNI native method java.lang.Thread.start0]
              [Registering JNI native method java.lang.Thread.stop0]
              [Registering JNI native method java.lang.Thread.isAlive]
              [Registering JNI native method java.lang.Thread.suspend0]
              [Registering JNI native method java.lang.Thread.resume0]
              [Registering JNI native method java.lang.Thread.setPriority0]
              [Registering JNI native method java.lang.Thread.yield]
              [Registering JNI native method java.lang.Thread.sleep]
              [Registering JNI native method java.lang.Thread.currentThread]
              [Registering JNI native method java.lang.Thread.countStackFrames]
              [Registering JNI native method java.lang.Thread.interrupt0]
              [Registering JNI native method java.lang.Thread.isInterrupted]
              [Registering JNI native method java.lang.Thread.holdsLock]
              [Registering JNI native method java.lang.Thread.getThreads]
              [Registering JNI native method java.lang.Thread.dumpThreads]
              [Dynamic-linking native method java.lang.Class.registerNatives ... JNI]
              [Registering JNI native method java.lang.Class.getName0]
              [Registering JNI native method java.lang.Class.getSuperclass]
              [Registering JNI native method java.lang.Class.getInterfaces]
              [Registering JNI native method java.lang.Class.getClassLoader0]
              [Registering JNI native method java.lang.Class.isInterface]
              [Registering JNI native method java.lang.Class.getSigners]
              [Registering JNI native method java.lang.Class.setSigners]
              [Registering JNI native method java.lang.Class.isArray]
              [Registering JNI native method java.lang.Class.isPrimitive]
              [Registering JNI native method java.lang.Class.getComponentType]
              [Registering JNI native method java.lang.Class.getModifiers]
              [Registering JNI native method java.lang.Class.getDeclaredFields0]
              [Registering JNI native method java.lang.Class.getDeclaredMethods0]
              [Registering JNI native method java.lang.Class.getDeclaredConstructors0]
              [Registering JNI native method java.lang.Class.getProtectionDomain0]
              [Registering JNI native method java.lang.Class.setProtectionDomain0]
              [Registering JNI native method java.lang.Class.getDeclaredClasses0]
              [Registering JNI native method java.lang.Class.getDeclaringClass]
              [Registering JNI native method java.lang.Class.getGenericSignature]
              [Registering JNI native method java.lang.Class.getRawAnnotations]
              [Registering JNI native method java.lang.Class.getConstantPool]
              [Registering JNI native method java.lang.Class.desiredAssertionStatus0]
              [Registering JNI native method java.lang.Class.getEnclosingMethod0]
              [Dynamic-linking native method java.lang.Class.getPrimitiveClass ... JNI]
              [Dynamic-linking native method java.security.AccessController.getStackAccessControlContext ... JNI]
              [Dynamic-linking native method sun.misc.Unsafe.registerNatives ... JNI]
              [Registering JNI native method sun.misc.Unsafe.getLoadAverage]
              [Dynamic-linking native method java.lang.Throwable.fillInStackTrace ... JNI]
              [Registering JNI native method sun.misc.Unsafe.copyMemory]
              [Registering JNI native method sun.misc.Unsafe.setMemory]
              [Registering JNI native method sun.misc.Unsafe.getObject]
              [Registering JNI native method sun.misc.Unsafe.putObject]
              [Registering JNI native method sun.misc.Unsafe.getObjectVolatile]
              [Registering JNI native method sun.misc.Unsafe.putObjectVolatile]
              [Registering JNI native method sun.misc.Unsafe.getBoolean]
              [Registering JNI native method sun.misc.Unsafe.putBoolean]
              [Registering JNI native method sun.misc.Unsafe.getBooleanVolatile]
              [Registering JNI native method sun.misc.Unsafe.putBooleanVolatile]
              [Registering JNI native method sun.misc.Unsafe.getByte]
              [Registering JNI native method sun.misc.Unsafe.putByte]
              [Registering JNI native method sun.misc.Unsafe.getByteVolatile]
              [Registering JNI native method sun.misc.Unsafe.putByteVolatile]
              [Registering JNI native method sun.misc.Unsafe.getShort]
              [Registering JNI native method sun.misc.Unsafe.putShort]
              [Registering JNI native method sun.misc.Unsafe.getShortVolatile]
              [Registering JNI native method sun.misc.Unsafe.putShortVolatile]
              [Registering JNI native method sun.misc.Unsafe.getChar]
              [Registering JNI native method sun.misc.Unsafe.putChar]
              [Registering JNI native method sun.misc.Unsafe.getCharVolatile]
              [Registering JNI native method sun.misc.Unsafe.putCharVolatile]
              [Registering JNI native method sun.misc.Unsafe.getInt]
              [Registering JNI native method sun.misc.Unsafe.putInt]
              [Registering JNI native method sun.misc.Unsafe.getIntVolatile]
              [Registering JNI native method sun.misc.Unsafe.putIntVolatile]
              [Registering JNI native method sun.misc.Unsafe.getLong]
              [Registering JNI native method sun.misc.Unsafe.putLong]
              [Registering JNI native method sun.misc.Unsafe.getLongVolatile]
              [Registering JNI native method sun.misc.Unsafe.putLongVolatile]
              [Registering JNI native method sun.misc.Unsafe.getFloat]
              [Registering JNI native method sun.misc.Unsafe.putFloat]
              [Registering JNI native method sun.misc.Unsafe.getFloatVolatile]
              [Registering JNI native method sun.misc.Unsafe.putFloatVolatile]
              [Registering JNI native method sun.misc.Unsafe.getDouble]
              [Registering JNI native method sun.misc.Unsafe.putDouble]
              [Registering JNI native method sun.misc.Unsafe.getDoubleVolatile]
              [Registering JNI native method sun.misc.Unsafe.putDoubleVolatile]
              [Registering JNI native method sun.misc.Unsafe.getByte]
              [Registering JNI native method sun.misc.Unsafe.putByte]
              [Registering JNI native method sun.misc.Unsafe.getShort]
              [Registering JNI native method sun.misc.Unsafe.putShort]
              [Registering JNI native method sun.misc.Unsafe.getChar]
              [Registering JNI native method sun.misc.Unsafe.putChar]
              [Registering JNI native method sun.misc.Unsafe.getInt]
              [Registering JNI native method sun.misc.Unsafe.putInt]
              [Registering JNI native method sun.misc.Unsafe.getLong]
              [Registering JNI native method sun.misc.Unsafe.putLong]
              [Registering JNI native method sun.misc.Unsafe.getFloat]
              [Registering JNI native method sun.misc.Unsafe.putFloat]
              [Registering JNI native method sun.misc.Unsafe.getDouble]
              [Registering JNI native method sun.misc.Unsafe.putDouble]
              [Registering JNI native method sun.misc.Unsafe.getAddress]
              [Registering JNI native method sun.misc.Unsafe.putAddress]
              [Registering JNI native method sun.misc.Unsafe.allocateMemory]
              [Registering JNI native method sun.misc.Unsafe.reallocateMemory]
              [Registering JNI native method sun.misc.Unsafe.freeMemory]
              [Registering JNI native method sun.misc.Unsafe.objectFieldOffset]
              [Registering JNI native method sun.misc.Unsafe.staticFieldOffset]
              [Registering JNI native method sun.misc.Unsafe.staticFieldBase]
              [Registering JNI native method sun.misc.Unsafe.ensureClassInitialized]
              [Registering JNI native method sun.misc.Unsafe.arrayBaseOffset]
              [Registering JNI native method sun.misc.Unsafe.arrayIndexScale]
              [Registering JNI native method sun.misc.Unsafe.addressSize]
              [Registering JNI native method sun.misc.Unsafe.pageSize]
              [Registering JNI native method sun.misc.Unsafe.defineClass]
              [Registering JNI native method sun.misc.Unsafe.defineClass]
              [Registering JNI native method sun.misc.Unsafe.allocateInstance]
              [Registering JNI native method sun.misc.Unsafe.monitorEnter]
              [Registering JNI native method sun.misc.Unsafe.monitorExit]
              [Registering JNI native method sun.misc.Unsafe.tryMonitorEnter]
              [Registering JNI native method sun.misc.Unsafe.throwException]
              [Registering JNI native method sun.misc.Unsafe.compareAndSwapObject]
              [Registering JNI native method sun.misc.Unsafe.compareAndSwapInt]
              [Registering JNI native method sun.misc.Unsafe.compareAndSwapLong]
              [Registering JNI native method sun.misc.Unsafe.putOrderedObject]
              [Registering JNI native method sun.misc.Unsafe.putOrderedInt]
              [Registering JNI native method sun.misc.Unsafe.putOrderedLong]
              [Registering JNI native method sun.misc.Unsafe.park]
              [Registering JNI native method sun.misc.Unsafe.unpark]
              [Dynamic-linking native method sun.reflect.Reflection.getCallerClass ... JNI]
              [Dynamic-linking native method java.security.AccessController.getInheritedAccessControlContext ... JNI]
              [Dynamic-linking native method java.lang.ClassLoader.registerNatives ... JNI]
              [Registering JNI native method java.lang.ClassLoader.retrieveDirectives]
              [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
              [Dynamic-linking native method java.lang.System.initProperties ... JNI]
              [Dynamic-linking native method sun.misc.VM.initialize ... JNI]
              [Dynamic-linking native method java.io.FileSystem.getFileSystem ... JNI]
              [Dynamic-linking native method java.io.UnixFileSystem.initIDs ... JNI]
              [Dynamic-linking native method java.lang.Float.floatToRawIntBits ... JNI]
              [Dynamic-linking native method java.lang.Double.doubleToRawLongBits ... JNI]
              [Dynamic-linking native method java.lang.String.intern ... JNI]
              [Dynamic-linking native method java.io.UnixFileSystem.getBooleanAttributes0 ... JNI]
              [Dynamic-linking native method java.lang.System.mapLibraryName ... JNI]
              [Dynamic-linking native method java.io.UnixFileSystem.canonicalize0 ... JNI]
              [Dynamic-linking native method java.lang.ClassLoader$NativeLibrary.load ... JNI]
              [Dynamic-linking native method java.io.FileInputStream.initIDs ... JNI]
              [Dynamic-linking native method java.io.FileDescriptor.initIDs ... JNI]
              [Dynamic-linking native method java.io.FileOutputStream.initIDs ... JNI]
              [Dynamic-linking native method java.lang.System.setIn0 ... JNI]
              [Dynamic-linking native method java.lang.Runtime.maxMemory ... JNI]
              [Dynamic-linking native method java.lang.System.setOut0 ... JNI]
              [Dynamic-linking native method java.lang.System.setErr0 ... JNI]
              [Dynamic-linking native method sun.misc.Signal.findSignal ... JNI]
              [Dynamic-linking native method sun.misc.Signal.handle0 ... JNI]
              [Dynamic-linking native method java.lang.Compiler.registerNatives ... JNI]
              [Registering JNI native method java.lang.Compiler.compileClass]
              [Registering JNI native method java.lang.Compiler.compileClasses]
              [Registering JNI native method java.lang.Compiler.command]
              [Registering JNI native method java.lang.Compiler.enable]
              [Registering JNI native method java.lang.Compiler.disable]
              [Dynamic-linking native method java.lang.ClassLoader$NativeLibrary.find ... JNI]
              [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
              [Dynamic-linking native method java.io.FileInputStream.open ... JNI]
              [Dynamic-linking native method java.io.FileInputStream.readBytes ... JNI]
              [Dynamic-linking native method java.io.FileInputStream.available ... JNI]
              [Dynamic-linking native method java.lang.Object.getClass ... JNI]
              [Dynamic-linking native method java.lang.reflect.Array.newArray ... JNI]
              [Dynamic-linking native method java.io.FileInputStream.close0 ... JNI]
              [Dynamic-linking native method java.io.UnixFileSystem.list ... JNI]
              [Dynamic-linking native method java.io.ObjectStreamClass.initNative ... JNI]
              [Dynamic-linking native method java.lang.Class.forName0 ... JNI]
              [Dynamic-linking native method sun.reflect.Reflection.getClassAccessFlags ... JNI]
              [Dynamic-linking native method sun.reflect.NativeConstructorAccessorImpl.newInstance0 ... JNI]
              [Dynamic-linking native method java.lang.ClassLoader.findLoadedClass0 ... JNI]
              [Dynamic-linking native method java.lang.ClassLoader.findBootstrapClass ... JNI]
              [Dynamic-linking native method sun.misc.VMSupport.initAgentProperties ... JNI]
              Listening for transport dt_socket at address: 8000
              [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.initIDs ... JNI]
              [Dynamic-linking native method java.io.UnixFileSystem.getLastModifiedTime ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.open ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.getTotal ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.getEntry ... JNI]
              [Dynamic-linking native method java.util.zip.ZipEntry.initIDs ... JNI]
              [Dynamic-linking native method java.util.zip.ZipEntry.initFields ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.freeEntry ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.getCSize ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.getSize ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.getMethod ... JNI]
              [Dynamic-linking native method java.util.zip.Inflater.initIDs ... JNI]
              [Dynamic-linking native method java.util.zip.Inflater.init ... JNI]
              [Dynamic-linking native method java.util.zip.Inflater.inflateBytes ... JNI]
              [Dynamic-linking native method java.util.zip.ZipFile.read ... JNI]
              [Dynamic-linking native method java.util.zip.Inflater.reset ... JNI]
              [Dynamic-linking native method java.lang.Package.getSystemPackage0 ... JNI]
              [Dynamic-linking native method java.util.jar.JarFile.getMetaInfEntryNames ... JNI]
              [Dynamic-linking native method java.lang.ClassLoader.defineClass1 ... JNI]
              [Dynamic-linking native method java.lang.ProcessEnvironment.environ ... JNI]
              [Dynamic-linking native method java.security.AccessController.doPrivileged ... JNI]
              [Dynamic-linking native method java.util.ResourceBundle.getClassContext ... JNI]
              [Dynamic-linking native method java.lang.Class.isAssignableFrom ... JNI]
              [Dynamic-linking native method java.lang.System.identityHashCode ... JNI]
              [Dynamic-linking native method java.util.concurrent.atomic.AtomicLong.VMSupportsCS8 ... JNI]
              [Dynamic-linking native method java.lang.Double.longBitsToDouble ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.initializeLibrary ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.connect ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_Initialize ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GetInfo ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GetSlotList ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GetSlotInfo ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GetTokenInfo ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_OpenSession ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GetMechanismList ... JNI]
              [Dynamic-linking native method sun.security.pkcs11.wrapper.PKCS11.C_GenerateRandom ... JNI]
              [Dynamic-linking native method java.net.InetAddress.init ... JNI]
              [Dynamic-linking native method java.net.InetAddressImplFactory.isIPv6Supported ... JNI]
              [Dynamic-linking native method java.net.Inet6AddressImpl.getLocalHostName ... JNI]
              [Dynamic-linking native method java.net.Inet6AddressImpl.lookupAllHostAddr ... JNI]
              [Dynamic-linking native method java.net.Inet4Address.init ... JNI]
              [Dynamic-linking native method java.net.Inet6Address.init ... JNI]
              [Dynamic-linking native method java.lang.Runtime.availableProcessors ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.initProto ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketCreate ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketBind ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketListen ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketAccept ... JNI]
              [Dynamic-linking native method sun.reflect.ConstantPool.getUTF8At0 ... JNI]
              [Dynamic-linking native method sun.reflect.NativeMethodAccessorImpl.invoke0 ... JNI]
              [Dynamic-linking native method java.lang.reflect.Proxy.defineClass0 ... JNI]
              [Dynamic-linking native method java.lang.UNIXProcess.initIDs ... JNI]
              [Dynamic-linking native method java.lang.UNIXProcess.forkAndExec ... JNI]
              [Dynamic-linking native method java.lang.UNIXProcess.waitForProcessExit ... JNI]
              [Dynamic-linking native method java.lang.UNIXProcess.destroyProcess ... JNI]
              [Dynamic-linking native method java.io.FileOutputStream.close0 ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketConnect ... JNI]
              [Dynamic-linking native method java.net.PlainSocketImpl.socketSetOption ... JNI]
              [Dynamic-linking native method java.net.SocketOutputStream.init ... JNI]
              [Dynamic-linking native method java.net.SocketOutputStream.socketWrite0 ... JNI]
              [Dynamic-linking native method java.net.SocketInputStream.init ... JNI]
              [Dynamic-linking native method java.net.SocketInputStream.socketRead0 ... JNI]
              [Dynamic-linking native method sun.misc.GC.maxObjectInspectionAge ... JNI]
              [Dynamic-linking native method java.lang.Runtime.gc ... JNI]
              # A fatal error has been detected by the Java Runtime Environment:
              # SIGFPE (0x8) at pc=0xfffffd7ffccbb898, pid=1912, tid=4
              # JRE version: 6.0_37-b06
              # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.12-b01 mixed mode solaris-amd64 compressed oops)
              # Problematic frame:
              # V [libjvm.so+0x46b898] JVM_GetCPClassNameUTF+0x94c8
              # An error report file with more information is saved as:
              # /testarea/gtt/test/jmx/servers/hs_err_pid1912.log
              # If you would like to submit a bug report, please visit:
              # http://java.sun.com/webapps/bugreport/crash.jsp

              Edited by: geting on Oct 30, 2012 6:43 PM

              Edited by: geting on Oct 30, 2012 6:43 PM
              • 4. Re: JVM Crashing with JNI and RMI
                One Java program is invoked by C using "JNI_CreateJavaVM".
                You know you're going to have to post that code some time.
                • 5. Re: JVM Crashing with JNI and RMI
                  Following is part of the Java program. It works fine if it is started by java command.

                  public class Server {

                  protected JMXConnectorServer cs;

                  public static MBeanServer mbServer;

                  public static String JMXHOST;
                  public static Integer JMXPORT;

                  public void start() {
                  try {

                  // Get the properties like JMXHOST and JMXPORT

                  // Instantiate the MBean server
                  mbServer = MBeanServerFactory.createMBeanServer();

                  // Registry RMI port
                  Logger.debug(Logger.DEBUG_INFO, "Create RMI Registry on port: %s",


                  // Create an RMI connector server
                  String strurl = "service:jmx:rmi:///jndi/" + opt_jmx_addr
                  + "/server";

                  JMXServiceURL url = new JMXServiceURL(strurl);

                  cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null,

                  } catch (Exception e) {

                  public static void main(String[] args) throws IOException,
                  JMXPropertiesException, Exception {
                  Server server = new Server();
                  try {
                  } catch (Exception e) {

                  • 6. Re: JVM Crashing with JNI and RMI
                    I meant the C code of course. Code that works is of little interest really.
                    • 7. Re: JVM Crashing with JNI and RMI
                      vm_args.version = JNI_VERSION_1_2;
                           vm_args.nOptions = ++noptions;
                           vm_args.options = options;
                           vm_args.ignoreUnrecognized = JNI_TRUE;
                           res = (*CreateJavaVM_TFunc)(&jvm, (void**)&env, &vm_args);
                           if (res < 0) {
                                fprintf(stderr, "Can't create Java VM\n");

                           cls = (*env)->FindClass(env, "***/***/jmx/***/Server");
                           if (1 == catch_exception(env) || cls == NULL) {
                                fprintf(stderr, "Can't find class Server\n");

                           mid_init = (*env)->GetMethodID(env, cls, "<init>", "()V");
                           if(mid_init== NULL){
                                fprintf(stderr, "Can't get method <init>\n");

                           server = (*env)->NewObjectA(env, cls, mid_init, NULL);
                           if(server == 0){
                                fprintf(stderr, "Can't create Server object\n");

                           mid_start = (*env)->GetMethodID(env, cls, "start", "()V");
                           if(mid_start == 0){
                                fprintf(stderr, "Can't get method start\n");
                           (*env)->CallVoidMethod(env, server, mid_start, NULL);
                           if(catch_exception(env) == 1){
                                fprintf(stderr, "Call start method failed.\n");

                      Edited by: geting on Oct 30, 2012 12:47 AM
                      • 8. Re: JVM Crashing with JNI and RMI
                        geting wrote:
                        And i remove all JNI operation which is write by me from JAVA code. But the core dump is still happen at the same place.
                        Now, here is the case. One Java program is invoked by C using "JNI_CreateJavaVM". In the Java program a RMI server is created.
                        Just to be clear...

                        When you say that you "remove all JNI" that means that you removed JNI_CreateJavaVM as well?
                        If you didn't remove that then you didn't remove all JNI.

                        If you have java code, only java code, with no JNI anywhere in any executio9n path that causes the crash that you posted then you should post that.
                        • 9. Re: JVM Crashing with JNI and RMI
                          Rather than letting that main thread just exit I think you should be calling JNI_DestroyJavaVM() at the end, to make it wait for the other JVM threads.
                          • 10. Re: JVM Crashing with JNI and RMI
                            The main thread did not exited. It is wait until the stop signal is received, then the JNI_DestroyJavaVM() will be called.