Java应用程序随机崩溃

时间:2014-11-20 13:24:16

标签: java swing memory-management crash

我们的应用程序随机崩溃。 Platform是RedHat Linux,java版本是jdk 1.6_17。它是一个基于swing的应用程序,具有大量本机代码。这种行为很随机。有时它会在几分钟内崩溃,有时会在几小时后或长时间后崩溃。我的pid文件有时会指向发生崩溃的ReferenceHandler线程。这是在自由行动期间。有时它会在malloc操作期间在EDT中崩溃,并且每次都不涉及我们的代码。在这方面,我将不胜感激任何帮助或线索,因为这并不总是可以重现......

在下面提供几个崩溃信息:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0017c952, pid=21338, tid=3465239456
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Server VM (14.3-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x61952]
#
# 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 (0x08142400):  JavaThread "Reference Handler" daemon [_thread_in_vm, id=21350, stack(0xce865000,0xce8b6000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000002f

Registers:
EAX=0x00244878, EBX=0x00242ff4, ECX=0x00000041, EDX=0x085098a0
ESP=0xce8b4c6c, EBP=0xce8b4cdc, ESI=0x0000002b, EDI=0x00000040
EIP=0x0017c952, CR2=0x0000002f, EFLAGS=0x00010206

Top of Stack: (sp=0xce8b4c6c)
0xce8b4c6c:   08142400 00000001 f6bb87c0 08142400
0xce8b4c7c:   08143100 00237ab1 00237ab1 00237ab1
0xce8b4c8c:   00237ab1 08143100 f69b322e ffffffff
0xce8b4c9c:   f6a7f5db 003613b6 00000038 00000040
0xce8b4cac:   00244878 0000002b 00244864 00244860
0xce8b4cbc:   00244840 f6a7f511 f6bb87c0 08142400
0xce8b4ccc:   08144440 00242ff4 08c44830 00017118
0xce8b4cdc:   ce8b4d74 0017d030 08144450 00000000 

Instructions: (pc=0x0017c952)
0x0017c942:   56 08 89 3c 3e 8b 75 d4 85 f6 0f 84 dd 00 00 00
0x0017c952:   8b 46 04 8b 7e 08 89 c2 89 7d d4 83 e2 fa 8d 3c 

Stack: [0xce865000,0xce8b6000],  sp=0xce8b4c6c,  free space=319k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x61952]
C  [libc.so.6+0x62030]
C  [libc.so.6+0x6263a]  __libc_free+0x8a
V  [libjvm.so+0x529abc]
V  [libjvm.so+0x635947]
J  sun.misc.Unsafe.freeMemory(J)V
j  java.nio.DirectByteBuffer$Deallocator.run()V+17
j  sun.misc.Cleaner.clean()V+12

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J  sun.misc.Unsafe.freeMemory(J)V
j  java.nio.DirectByteBuffer$Deallocator.run()V+17
j  sun.misc.Cleaner.clean()V+12
J  java.lang.ref.Reference$ReferenceHandler.run()V
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
  0xceb0d400 JavaThread "TimerQueue" daemon [_thread_blocked, id=21382, stack(0xcb4bc000,0xcb50d000)]
  0xcb6a9c00 JavaThread "DestroyJavaVM" [_thread_blocked, id=21340, stack(0xf6451000,0xf64a2000)]
  0x085c0000 JavaThread "SELECT" [_thread_in_native, id=21370, stack(0xcbb5e000,0xcbbaf000)]
  0xcb391800 JavaThread "Thread-2" [_thread_blocked, id=21362, stack(0xcec52000,0xceca3000)]
  0xcbcb7800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=21361, stack(0xcbbaf000,0xcbc00000)]
  0xcbcb6c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=21360, stack(0xcbd34000,0xcbd85000)]
  0xcc162000 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=21358, stack(0xcbe80000,0xcbed1000)]
  0x0814e800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=21357, stack(0xcc0af000,0xcc100000)]
  0xceb02c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=21355, stack(0xce470000,0xce4c1000)]
  0xceb00800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=21354, stack(0xce4c1000,0xce542000)]
  0x08158400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=21353, stack(0xce542000,0xce5c3000)]
  0x08156800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=21352, stack(0xce5c3000,0xce614000)]
  0x08147000 JavaThread "Finalizer" daemon [_thread_blocked, id=21351, stack(0xce814000,0xce865000)]
=>0x08142400 JavaThread "Reference Handler" daemon [_thread_in_vm, id=21350, stack(0xce865000,0xce8b6000)]

Other Threads:
  0x0813e400 VMThread [stack: 0xce8b6000,0xce937000] [id=21349]
  0xceb04800 WatcherThread [stack: 0xce3ef000,0xce470000] [id=21356]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 50112K, used 2233K [0xefa40000, 0xf3300000, 0xf3320000)
  eden space 43264K, 2% used [0xefa40000,0xefb4e638,0xf2480000)
  from space 6848K, 16% used [0xf2480000,0xf25a0020,0xf2b30000)
  to   space 6400K, 0% used [0xf2cc0000,0xf2cc0000,0xf3300000)
 PSOldGen        total 81536K, used 56385K [0xd3320000, 0xd82c0000, 0xefa40000)
  object space 81536K, 69% used [0xd3320000,0xd6a30570,0xd82c0000)
 PSPermGen       total 30848K, used 22673K [0xcf320000, 0xd1140000, 0xd3320000)
  object space 30848K, 73% used [0xcf320000,0xd09446b0,0xd1140000)

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0017c952, pid=13407, tid=2378705824
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Server VM (14.3-b01 mixed mode linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x61952]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

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

Current thread (0x8db87c00):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=13430, stack(0x8dc32000,0x8dc83000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x00000005

Registers:
EAX=0x00244878, EBX=0x00242ff4, ECX=0x00000021, EDX=0x081f7148
ESP=0x8dc81088, EBP=0x8dc810f8, ESI=0x00000001, EDI=0x00000020
EIP=0x0017c952, CR2=0x00000005, EFLAGS=0x00210202

Top of Stack: (sp=0x8dc81088)
0x8dc81088:   945360d8 8e1bf010 b7bb8e68 8e1bf018
0x8dc81098:   906acac0 00237ab1 00237ab1 00237ab1
0x8dc810a8:   00237ab1 b7745a7a 90340158 b353b778
0x8dc810b8:   8dc810b8 908778be 00000020 00000020
0x8dc810c8:   00244878 00000001 00244864 00244860
0x8dc810d8:   00244840 0035d109 8e133cd0 00363ff4
0x8dc810e8:   0035d397 00242ff4 00244840 00000000
0x8dc810f8:   8dc811bc 0017d918 8dc81120 b79e9a17 

Instructions: (pc=0x0017c952)
0x0017c942:   56 08 89 3c 3e 8b 75 d4 85 f6 0f 84 dd 00 00 00
0x0017c952:   8b 46 04 8b 7e 08 89 c2 89 7d d4 83 e2 fa 8d 3c 

Stack: [0x8dc32000,0x8dc83000],  sp=0x8dc81088,  free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x61952]
C  [libc.so.6+0x62918]
C  [libc.so.6+0x646e1]  malloc+0x81
C  [libfontmanager.so+0x42d62]
C  [libfontmanager.so+0x43dc8]  Java_sun_java2d_loops_DrawGlyphListAA_DrawGlyphListAA+0x48
j  sun.java2d.loops.DrawGlyphListAA.DrawGlyphListAA(Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Lsun/font/GlyphList;)V+0
j  sun.java2d.pipe.AATextRenderer.drawGlyphList(Lsun/java2d/SunGraphics2D;Lsun/font/GlyphList;)V+13
j  sun.java2d.pipe.GlyphListPipe.drawChars(Lsun/java2d/SunGraphics2D;[CIIII)V+167
j  sun.java2d.pipe.ValidatePipe.drawChars(Lsun/java2d/SunGraphics2D;[CIIII)V+21
j  sun.java2d.SunGraphics2D.drawChars([CIIII)V+100
j  sun.swing.SwingUtilities2.drawChars(Ljavax/swing/JComponent;Ljava/awt/Graphics;[CIIII)I+313

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.java2d.loops.DrawGlyphListAA.DrawGlyphListAA(Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Lsun/font/GlyphList;)V+0
j  sun.java2d.pipe.AATextRenderer.drawGlyphList(Lsun/java2d/SunGraphics2D;Lsun/font/GlyphList;)V+13
j  sun.java2d.pipe.GlyphListPipe.drawChars(Lsun/java2d/SunGraphics2D;[CIIII)V+167
j  sun.java2d.pipe.ValidatePipe.drawChars(Lsun/java2d/SunGraphics2D;[CIIII)V+21
j  sun.java2d.SunGraphics2D.drawChars([CIIII)V+100
j  sun.swing.SwingUtilities2.drawChars(Ljavax/swing/JComponent;Ljava/awt/Graphics;[CIIII)I+313
J  javax.swing.text.Utilities.drawTabbedText(Ljavax/swing/text/View;Ljavax/swing/text/Segment;IILjava/awt/Graphics;Ljavax/swing/text/TabExpander;I[I)I
j  javax.swing.text.Utilities.drawTabbedText(Ljavax/swing/text/View;Ljavax/swing/text/Segment;IILjava/awt/Graphics;Ljavax/swing/text/TabExpander;I)I+11
j  javax.swing.text.PlainView.drawUnselectedText(Ljava/awt/Graphics;IIII)I+44
j  javax.swing.text.PlainView.drawElement(ILjavax/swing/text/Element;Ljava/awt/Graphics;II)I+135
j  javax.swing.text.PlainView.drawLine(ILjava/awt/Graphics;II)V+30
j  javax.swing.text.PlainView.paint(Ljava/awt/Graphics;Ljava/awt/Shape;)V+407
j  javax.swing.plaf.basic.BasicTextUI$RootView.paint(Ljava/awt/Graphics;Ljava/awt/Shape;)V+48
j  javax.swing.plaf.basic.BasicTextUI.paintSafely(Ljava/awt/Graphics;)V+65
j  javax.swing.plaf.basic.BasicTextUI.paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+45
j  javax.swing.plaf.basic.BasicTextUI.update(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+3
j  javax.swing.JComponent.paintComponent(Ljava/awt/Graphics;)V+26
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+290
j  javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V+473
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+322
j  javax.swing.JViewport.paint(Ljava/awt/Graphics;)V+205
j  javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V+473
j  javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+322
j  javax.swing.JComponent.paintToOffscreen(Ljava/awt/Graphics;IIIIII)V+41
j  javax.swing.BufferStrategyPaintManager.paint(Ljavax/swing/JComponent;Ljavax/swing/JComponent;Ljava/awt/Graphics;IIII)Z+157
j  javax.swing.RepaintManager.paint(Ljavax/swing/JComponent;Ljavax/swing/JComponent;Ljava/awt/Graphics;IIII)V+52
j  javax.swing.JComponent._paintImmediately(IIII)V+679
j  javax.swing.JComponent.paintImmediately(IIII)V+83
j  javax.swing.RepaintManager.paintDirtyRegions(Ljava/util/Map;)V+199
j  javax.swing.RepaintManager.paintDirtyRegions()V+46
j  javax.swing.RepaintManager.seqPaintDirtyRegions()V+73
j  javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()V+36
J  java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z
j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j  java.awt.EventDispatchThread.run()V+9
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
  0x088f7c00 JavaThread "Thread-6" [_thread_blocked, id=13530, stack(0x8ca5d000,0x8caae000)]
  0x0835c000 JavaThread "process reaper" daemon [_thread_in_native, id=13514, stack(0x8ca0c000,0x8ca5d000)]
  0x08402c00 JavaThread "wish Thread" [_thread_blocked, id=13512, stack(0x8caae000,0x8caff000)]
  0x8d904400 JavaThread "TimerQueue" daemon [_thread_blocked, id=13494, stack(0x8d816000,0x8d867000)]
  0x8fcd7c00 JavaThread "DestroyJavaVM" [_thread_blocked, id=13409, stack(0xb7467000,0xb74b8000)]
  0x8d7f4000 JavaThread "SELECT" [_thread_in_native, id=13451, stack(0x8da80000,0x8dad1000)]
  0x8d9c5c00 JavaThread "Thread-2" [_thread_blocked, id=13443, stack(0x8d88d000,0x8d8de000)]
=>0x8db87c00 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=13430, stack(0x8dc32000,0x8dc83000)]
  0x8db7f800 JavaThread "AWT-Shutdown" [_thread_blocked, id=13429, stack(0x8dc83000,0x8dcd4000)]
  0x8e136400 JavaThread "AWT-XAWT" daemon [_thread_in_native, id=13427, stack(0x8ddf2000,0x8de43000)]
  0x0820e800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=13426, stack(0x8e021000,0x8e072000)]
  0x8fc01c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=13424, stack(0x8f570000,0x8f5c1000)]
  0x0815a400 JavaThread "CompilerThread1" daemon [_thread_blocked, id=13423, stack(0x8f5c1000,0x8f642000)]
  0x08158000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=13422, stack(0x8f642000,0x8f6c3000)]
  0x08156800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13421, stack(0x8f6c3000,0x8f714000)]
  0x08146c00 JavaThread "Finalizer" daemon [_thread_blocked, id=13420, stack(0x8f914000,0x8f965000)]
  0x08142400 JavaThread "Reference Handler" daemon [_thread_blocked, id=13419, stack(0x8f965000,0x8f9b6000)]

Other Threads:
  0x0813e400 VMThread [stack: 0x8f9b6000,0x8fa37000] [id=13418]
  0x8fc03c00 WatcherThread [stack: 0x8f4ef000,0x8f570000] [id=13425]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 52288K, used 45814K [0xb0a60000, 0xb41e0000, 0xb4340000)
  eden space 48512K, 90% used [0xb0a60000,0xb3571ad8,0xb39c0000)
  from space 3776K, 45% used [0xb3e30000,0xb3fdc030,0xb41e0000)
  to   space 4160K, 0% used [0xb39c0000,0xb39c0000,0xb3dd0000)
 PSOldGen        total 47680K, used 32439K [0x94340000, 0x971d0000, 0xb0a60000)
  object space 47680K, 68% used [0x94340000,0x962edc20,0x971d0000)
 PSPermGen       total 42496K, used 21150K [0x90340000, 0x92cc0000, 0x94340000)
  object space 42496K, 49% used [0x90340000,0x917e7b48,0x92cc0000)

0 个答案:

没有答案