Java运行时崩溃,导致致命错误

时间:2013-11-21 21:57:44

标签: java linux jvm embedded-linux

您好我正在运行java应用程序/实际上它是对嵌入式Linux机器的测试。过了一会儿,测试因崩溃而失败

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (os_linux_zero.cpp:270), pid=2951, tid=1328632944
#  fatal error: caught unhandled signal 11
#
# JRE version: 6.0_24-b24
# Java VM: OpenJDK Zero VM (20.0-b12 mixed mode linux-arm )
# Derivative: IcedTea6 1.12pre
# Distribution: Built for 
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
#   http://icedtea.classpath.org/bugzilla
#

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

Current thread (0x00073a40):  VMThread [stack: 0x4f297000,0x4f316000] [id=2953]

Stack: [0x4f297000,0x4f316000],  sp=0x4f314454,  free space=501k
VM_Operation (0x40ffb484): GenCollectForAllocation, mode: safepoint, requested by thread 0x0001db38


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

Java Threads: ( => current thread )
  0x000418c0 JavaThread "Thread-1" daemon [_thread_in_native, id=2990, stack(0x51a36000,0x51bb6000)]
  0x000e6150 JavaThread "Thread-0" daemon [_thread_in_native, id=2989, stack(0x518b6000,0x51a36000)]
  0x0008c290 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2960, stack(0x4f796000,0x4f916000)]
  0x00089988 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2959, stack(0x4f616000,0x4f796000)]
  0x0007c288 JavaThread "Finalizer" daemon [_thread_blocked, id=2958, stack(0x4f496000,0x4f616000)]
  0x00077868 JavaThread "Reference Handler" daemon [_thread_blocked, id=2957, stack(0x4f316000,0x4f496000)]
  0x0001db38 JavaThread "main" [_thread_blocked, id=2952, stack(0x40f3a000,0x410b9000)]

Other Threads:
=>0x00073a40 VMThread [stack: 0x4f297000,0x4f316000] [id=2953]
  0x0008df80 WatcherThread [stack: 0x4f917000,0x4f996000] [id=2961]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x0001cfb0] Threads_lock - owner thread: 0x00073a40
[0x0001d3c0] Heap_lock - owner thread: 0x0001db38

Heap
 def new generation   total 4480K, used 4181K [0x43200000, 0x436c0000, 0x45c00000)
  eden space 4096K,  99% used [0x43200000, 0x435fffd0, 0x43600000)
  from space 384K,  22% used [0x43660000, 0x436755f8, 0x436c0000)
  to   space 384K, 100% used [0x43600000, 0x43660000, 0x43660000)
 tenured generation   total 9572K, used 5980K [0x45c00000, 0x46559000, 0x4b000000)
   the space 9572K,  62% used [0x45c00000, 0x461d70e8, 0x461d7200, 0x46559000)
 compacting perm gen  total 4352K, used 4258K [0x4b000000, 0x4b440000, 0x4f000000)
   the space 4352K,  97% used [0x4b000000, 0x4b4289c8, 0x4b428a00, 0x4b440000)
No shared spaces configured.

Code Cache  [0x4117b000, 0x411a3000, 0x4317b000)
 total_blobs=80 nmethods=0 adapters=66 free_code_cache=33482752 largest_free_block=0

Dynamic libraries:
00008000-00011000 r-xp 00000000 1f:0b 4430       /usr/local/jvm/icedtea-openjdk-oe-core-jre/bin/java
00018000-00019000 rwxp 00008000 1f:0b 4430       /usr/local/jvm/icedtea-openjdk-oe-core-jre/bin/java
00019000-00898000 rwxp 00000000 00:00 0          [heap]
40000000-4001f000 r-xp 00000000 1f:0b 532        /lib/ld-2.11.1.so
4001f000-40022000 rwxp 00000000 00:00 0 
40022000-40023000 ---p 00000000 00:00 0 
40023000-40024000 rwxp 00000000 00:00 0 
40024000-40026000 r-xs 00013000 1f:0b 4451       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/jce.jar
40026000-40027000 r-xp 0001e000 1f:0b 532        /lib/ld-2.11.1.so
40027000-40028000 rwxp 0001f000 1f:0b 532        /lib/ld-2.11.1.so
40028000-4003d000 r-xp 00000000 1f:0b 566        /lib/libpthread-2.11.1.so
4003d000-40044000 ---p 00015000 1f:0b 566        /lib/libpthread-2.11.1.so
40044000-40045000 r-xp 00014000 1f:0b 566        /lib/libpthread-2.11.1.so
40045000-40046000 rwxp 00015000 1f:0b 566        /lib/libpthread-2.11.1.so
40046000-40048000 rwxp 00000000 00:00 0 
40048000-4004b000 r-xp 00000000 1f:0b 4502       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/jli/libjli.so
4004b000-40052000 ---p 00003000 1f:0b 4502       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/jli/libjli.so
40052000-40053000 rwxp 00002000 1f:0b 4502       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/jli/libjli.so
40053000-40057000 r-xp 00000000 1f:0b 544        /lib/libdl-2.11.1.so
40057000-4005e000 ---p 00004000 1f:0b 544        /lib/libdl-2.11.1.so
4005e000-4005f000 r-xp 00003000 1f:0b 544        /lib/libdl-2.11.1.so
4005f000-40060000 rwxp 00004000 1f:0b 544        /lib/libdl-2.11.1.so
40060000-4019b000 r-xp 00000000 1f:0b 538        /lib/libc-2.11.1.so
4019b000-401a2000 ---p 0013b000 1f:0b 538        /lib/libc-2.11.1.so
401a2000-401a4000 r-xp 0013a000 1f:0b 538        /lib/libc-2.11.1.so
401a4000-401a5000 rwxp 0013c000 1f:0b 538        /lib/libc-2.11.1.so
401a5000-401a8000 rwxp 00000000 00:00 0 
401a8000-401c7000 r-xp 00000000 1f:0b 3153       /usr/lib/libz.so.1.2.3
401c7000-401ce000 ---p 0001f000 1f:0b 3153       /usr/lib/libz.so.1.2.3
401ce000-401cf000 rwxp 0001e000 1f:0b 3153       /usr/lib/libz.so.1.2.3
401cf000-401da000 r-xp 00000000 1f:0b 547        /lib/libgcc_s.so.1
401da000-401e1000 ---p 0000b000 1f:0b 547        /lib/libgcc_s.so.1
401e1000-401e2000 rwxp 0000a000 1f:0b 547        /lib/libgcc_s.so.1
401e2000-40555000 r-xp 00000000 1f:0b 4504       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/server/libjvm.so
40555000-4055d000 ---p 00373000 1f:0b 4504       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/server/libjvm.so
4055d000-4057a000 rwxp 00373000 1f:0b 4504       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/server/libjvm.so
4057a000-405d4000 rwxp 00000000 00:00 0 
405d4000-4069b000 r-xp 00000000 1f:0b 575        /lib/libstdc++.so.6.0.12
4069b000-406a3000 ---p 000c7000 1f:0b 575        /lib/libstdc++.so.6.0.12
406a3000-406a6000 r-xp 000c7000 1f:0b 575        /lib/libstdc++.so.6.0.12
406a6000-406a8000 rwxp 000ca000 1f:0b 575        /lib/libstdc++.so.6.0.12
406a8000-406ae000 rwxp 00000000 00:00 0 
406ae000-40722000 r-xp 00000000 1f:0b 548        /lib/libm-2.11.1.so
40722000-40729000 ---p 00074000 1f:0b 548        /lib/libm-2.11.1.so
40729000-4072a000 r-xp 00073000 1f:0b 548        /lib/libm-2.11.1.so
4072a000-4072b000 rwxp 00074000 1f:0b 548        /lib/libm-2.11.1.so
4072b000-40730000 r-xp 00000000 1f:0b 3056       /usr/lib/libffi.so.5
40730000-40738000 ---p 00005000 1f:0b 3056       /usr/lib/libffi.so.5
40738000-40739000 rwxp 00005000 1f:0b 3056       /usr/lib/libffi.so.5
40739000-40f39000 rwxp 00000000 00:00 0 
40f39000-40f3d000 ---p 00000000 00:00 0 
40f3d000-410b9000 rwxp 00000000 00:00 0 
410b9000-410c0000 r-xp 00000000 1f:0b 572        /lib/librt-2.11.1.so
410c0000-410c7000 ---p 00007000 1f:0b 572        /lib/librt-2.11.1.so
410c7000-410c8000 r-xp 00006000 1f:0b 572        /lib/librt-2.11.1.so
410c8000-410c9000 rwxp 00007000 1f:0b 572        /lib/librt-2.11.1.so
410c9000-410d2000 r-xp 00000000 1f:0b 4496       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libverify.so
410d2000-410da000 ---p 00009000 1f:0b 4496       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libverify.so
410da000-410db000 rwxp 00009000 1f:0b 4496       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libverify.so
410db000-41101000 r-xp 00000000 1f:0b 4481       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libjava.so
41101000-41109000 ---p 00026000 1f:0b 4481       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libjava.so
41109000-4110b000 rwxp 00026000 1f:0b 4481       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libjava.so
4110b000-41113000 r-xp 00000000 1f:0b 553        /lib/libnss_compat-2.11.1.so
41113000-4111a000 ---p 00008000 1f:0b 553        /lib/libnss_compat-2.11.1.so
4111a000-4111b000 r-xp 00007000 1f:0b 553        /lib/libnss_compat-2.11.1.so
4111b000-4111c000 rwxp 00008000 1f:0b 553        /lib/libnss_compat-2.11.1.so
4111c000-41131000 r-xp 00000000 1f:0b 551        /lib/libnsl-2.11.1.so
41131000-41138000 ---p 00015000 1f:0b 551        /lib/libnsl-2.11.1.so
41138000-41139000 r-xp 00014000 1f:0b 551        /lib/libnsl-2.11.1.so
41139000-4113a000 rwxp 00015000 1f:0b 551        /lib/libnsl-2.11.1.so
4113a000-4113c000 rwxp 00000000 00:00 0 
4113c000-41147000 r-xp 00000000 1f:0b 561        /lib/libnss_nis-2.11.1.so
41147000-4114e000 ---p 0000b000 1f:0b 561        /lib/libnss_nis-2.11.1.so
4114e000-4114f000 r-xp 0000a000 1f:0b 561        /lib/libnss_nis-2.11.1.so
4114f000-41150000 rwxp 0000b000 1f:0b 561        /lib/libnss_nis-2.11.1.so
41150000-4115c000 r-xp 00000000 1f:0b 557        /lib/libnss_files-2.11.1.so
4115c000-41163000 ---p 0000c000 1f:0b 557        /lib/libnss_files-2.11.1.so
41163000-41164000 r-xp 0000b000 1f:0b 557        /lib/libnss_files-2.11.1.so
41164000-41165000 rwxp 0000c000 1f:0b 557        /lib/libnss_files-2.11.1.so
41165000-4116d000 rwxs 00000000 00:11 6173       /tmp/hsperfdata_root/2951
4116d000-41173000 r-xp 00000000 1f:0b 4497       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libzip.so
41173000-4117a000 ---p 00006000 1f:0b 4497       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libzip.so
4117a000-4117b000 rwxp 00005000 1f:0b 4497       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/libzip.so
4117b000-411a3000 rwxp 00000000 00:00 0 
411a3000-4317b000 rwxp 00000000 00:00 0 
4317b000-4317c000 rwxp 00000000 00:00 0 
4317c000-431fb000 rwxp 00000000 00:00 0 
431fb000-431fe000 r-xs 0007d000 1f:0b 4453       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/jsse.jar
431fe000-43200000 r-xs 0009a000 1f:0d 2388       /mnt/platform/javaTest.jar
43200000-436c0000 rwxp 00000000 00:00 0 
436c0000-45c00000 rwxp 00000000 00:00 0 
45c00000-46559000 rwxp 00000000 00:00 0 
46559000-4b000000 rwxp 00000000 00:00 0 
4b000000-4b440000 rwxp 00000000 00:00 0 
4b440000-4f000000 rwxp 00000000 00:00 0 
4f000000-4f003000 rwxp 00000000 00:00 0 
4f003000-4f015000 rwxp 00000000 00:00 0 
4f015000-4f01a000 rwxp 00000000 00:00 0 
4f01a000-4f03f000 rwxp 00000000 00:00 0 
4f03f000-4f042000 rwxp 00000000 00:00 0 
4f042000-4f05f000 rwxp 00000000 00:00 0 
4f05f000-4f065000 rwxp 00000000 00:00 0 
4f065000-4f08b000 rwxp 00000000 00:00 0 
4f08b000-4f08e000 rwxp 00000000 00:00 0 
4f08e000-4f0ac000 rwxp 00000000 00:00 0 
4f0ac000-4f0b3000 r-xs 000fb000 1f:0b 4462       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/resources.jar
4f0b3000-4f253000 r-xs 019cd000 1f:0b 4463       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/rt.jar
4f253000-4f288000 rwxp 00000000 00:00 0 
4f288000-4f296000 r-xs 00351000 1f:0b 4434       /usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/charsets.jar
4f296000-4f297000 ---p 00000000 00:00 0 
4f297000-4f316000 rwxp 00000000 00:00 0          [threadstack:0007dfa8]
4f316000-4f319000 ---p 00000000 00:00 0 
4f319000-4f496000 rwxp 00000000 00:00 0 
4f496000-4f499000 ---p 00000000 00:00 0 
4f499000-4f616000 rwxp 00000000 00:00 0 
4f616000-4f619000 ---p 00000000 00:00 0 
4f619000-4f796000 rwxp 00000000 00:00 0 
4f796000-4f799000 ---p 00000000 00:00 0 
4f799000-4f916000 rwxp 00000000 00:00 0 
4f916000-4f917000 ---p 00000000 00:00 0 
4f917000-4f996000 rwxp 00000000 00:00 0 
4f996000-4f998000 r-xs 0009a000 1f:0d 2388       /mnt/platform/javaTest.jar
4f998000-4f99f000 r-xs 0007d000 1f:0d 2389       /mnt/platform/lib/Symbol.RFID.API3.jar
4f99f000-4f9b4000 r-xp 00000000 1f:0d 1692       /mnt/platform/lib/librfidapi32jni.so
4f9b4000-4f9bc000 ---p 00015000 1f:0d 1692       /mnt/platform/lib/librfidapi32jni.so
4f9bc000-4f9bd000 rwxp 00015000 1f:0d 1692       /mnt/platform/lib/librfidapi32jni.so
4f9bd000-4fa54000 r-xp 00000000 1f:0d 1693       /mnt/platform/lib/librfidapi32.so
4fa54000-4fa5c000 ---p 00097000 1f:0d 1693       /mnt/platform/lib/librfidapi32.so
4fa5c000-4fa5f000 rwxp 00097000 1f:0d 1693       /mnt/platform/lib/librfidapi32.so
4fa5f000-4fa60000 rwxp 00000000 00:00 0 
4fa60000-4fb84000 r-xp 00000000 1f:0b 3149       /usr/lib/libxml2.so.2.7.8
4fb84000-4fb8c000 ---p 00124000 1f:0b 3149       /usr/lib/libxml2.so.2.7.8
4fb8c000-4fb91000 rwxp 00124000 1f:0b 3149       /usr/lib/libxml2.so.2.7.8
4fb91000-4fb92000 rwxp 00000000 00:00 0 
4fb92000-4fca0000 r-xp 00000000 1f:0d 1685       /mnt/platform/lib/libltk.so
4fca0000-4fca8000 ---p 0010e000 1f:0d 1685       /mnt/platform/lib/libltk.so
4fca8000-4fcb4000 rwxp 0010e000 1f:0d 1685       /mnt/platform/lib/libltk.so
4fcb4000-4fcd6000 r-xp 00000000 1f:0b 3128       /usr/lib/libssh2.so.1.0.1
4fcd6000-4fcde000 ---p 00022000 1f:0b 3128       /usr/lib/libssh2.so.1.0.1
4fcde000-4fcdf000 rwxp 00022000 1f:0b 3128       /usr/lib/libssh2.so.1.0.1
4fcdf000-4fd32000 r-xp 00000000 1f:0b 3132       /usr/lib/libssl.so.1.0.0
4fd32000-4fd3a000 ---p 00053000 1f:0b 3132       /usr/lib/libssl.so.1.0.0
4fd3a000-4fd3f000 rwxp 00053000 1f:0b 3132       /usr/lib/libssl.so.1.0.0
4fd3f000-4fd93000 r-xp 00000000 1f:0b 3048       /usr/lib/libcurl.so.4.3.0
4fd93000-4fd9b000 ---p 00054000 1f:0b 3048       /usr/lib/libcurl.so.4.3.0
4fd9b000-4fd9d000 rwxp 00054000 1f:0b 3048       /usr/lib/libcurl.so.4.3.0
4fd9d000-4ff94000 r-xp 00000000 1f:0b 3044       /usr/lib/libcrypto.so.1.0.0
4ff94000-4ff9b000 ---p 001f7000 1f:0b 3044       /usr/lib/libcrypto.so.1.0.0
4ff9b000-4ffb1000 rwxp 001f6000 1f:0b 3044       /usr/lib/libcrypto.so.1.0.0
4ffb1000-500b6000 rwxp 00000000 00:00 0 
500b6000-500b7000 ---p 00000000 00:00 0 
500b7000-508b6000 rwxp 00000000 00:00 0 
508b6000-508b7000 ---p 00000000 00:00 0 
508b7000-510b6000 rwxp 00000000 00:00 0 
510b6000-510b7000 ---p 00000000 00:00 0 
510b7000-518b6000 rwxp 00000000 00:00 0 
518b6000-518b9000 ---p 00000000 00:00 0 
518b9000-51a36000 rwxp 00000000 00:00 0 
51a36000-51a39000 ---p 00000000 00:00 0 
51a39000-51bb6000 rwxp 00000000 00:00 0 
51c00000-51d21000 rwxp 00000000 00:00 0 
51d21000-51e00000 ---p 00000000 00:00 0 
beede000-bef11000 rw-p 00000000 00:00 0          [stack]

VM Arguments:
java_command: javaTest.jar
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=/usr/local/jvm/icedtea-openjdk-oe-core-jre
CLASSPATH=/platform/lib/Symbol.RFID.API3.jar
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/jvm/icedtea-openjdk-oe-core-jre/bin
LD_LIBRARY_PATH=/usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm/server:/usr/local/jvm/icedtea-openjdk-oe-core-jre/lib/arm:/usr/local/jvm/icedtea-openjdk-oe-core-jre/../lib/arm:/platform/lib/
SHELL=/bin/bash

Signal Handlers:
SIGSEGV: [libjvm.so+0x31ecfc], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x31ecfc], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x2718c8], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x2718c8], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x2718c8], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x2718c8], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x271a78], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x274094], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x274094], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x274094], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x274094], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


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

OS:Linux
uname:Linux 2.6.32.8 #160 PREEMPT Wed Nov 20 09:35:38 EST 2013 armv7l
libc:glibc 2.11.1 NPTL 2.11.1 
rlimit: STACK 8192k, CORE 2048k, NPROC 1991, NOFILE 1024, AS infinity
load average:4.10 3.66 3.59

/proc/meminfo:
MemTotal:         255080 kB
MemFree:          101392 kB
Buffers:               0 kB
Cached:            73876 kB
SwapCached:            0 kB
Active:            96644 kB
Inactive:          42048 kB
Active(anon):      67736 kB
Inactive(anon):        0 kB
Active(file):      28908 kB
Inactive(file):    42048 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         64836 kB
Mapped:            20092 kB
Shmem:              2920 kB
Slab:               9524 kB
SReclaimable:       2328 kB
SUnreclaim:         7196 kB
KernelStack:        1496 kB
PageTables:         1312 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      127540 kB
Committed_AS:    1096640 kB
VmallocTotal:     647168 kB
VmallocUsed:         628 kB
VmallocChunk:     645884 kB


CPU:total 1 

Memory: 4k page, physical 255080k(101392k free), swap 0k(0k free)

vm_info: OpenJDK Zero VM (20.0-b12) for linux-arm JRE (1.6.0_24-b24), built on Jul 24 2012 19:26:05 by "mvdev" with gcc 4.7.2 20120706 (prerelease)

time: Wed Nov 20 17:51:51 2013
elapsed time: 11574 seconds

如何找出问题的根本原因?我看到创建了一个“core-java-2951-1384969911”文件,大约2MB核心转储。我真的需要调试核心转储吗?如果是,我该怎么办?

1 个答案:

答案 0 :(得分:2)

由于核心转储只是运行进程数据的原始转储,我所做的一件事就是将其转换为堆转储。为此,您可以使用jmap:

jmap -heap:format=b <java-executable> <core-file>

根据核心文件的大小,现在可能是获取饮料,去吃午餐,甚至可能赶上电影的好时机。 (我已经看到这个命令从20分钟到一个半小时。)确保参数指向实际创建核心转储的java可执行文件。确保从同一版本的java运行jmap命令可能也是最安全的。 (jmap相当陈旧,早在java 1.4.2中就附带了jdk。)

一旦这个命令完成,你应该有一个可以用jhat工具浏览的heap.bin文件。 (它们应该可以使用较新的JVisualVM工具查看,但出于某种原因,该工具在加载这些文件时似乎失败了。)这个工具不像jmap那样古老了(jhat从JDK开始附带版本1.6),但是从现在开始有一个堆文件而不是原始核心转储,我们可以使用随新JDK一起分发的jhat。既然你是Java 6,那你就没事了:

jhat -J-Xmx1024M heap.bin

同样,根据堆文件的大小,此命令可能需要大量时间和内存。您可能需要提高“1024”参数。您甚至可能必须在服务器(而不是本地计算机)上运行它,以便绕过Java在Windows上施加的2 GB堆限制。有时从核心生成的堆文件会导致jhat产生大量错误,因此您可能希望将标准输出重定向到文件。最后,jhat进程将完成读取文件并开始侦听端口7000.然后,您可以将Web浏览器指向正在运行的计算机(不要忘记将“:7000”添加到主机名)并开始浏览JVM崩溃时堆上的对象。

更新:自从我上次运行JMap工具以来,参数可能已经改变了。我只是尝试再次运行它,似乎我不得不使用:

jmap -dump:live,format=b,file=heap.bin <java-executable> <core-file>

如果一个命令对您不起作用,您可能想尝试另一个命令。