Tomcat 运行一段时间后就停止了,好像是因为java虚拟机出错退出导致tomcat服务终止了。
Tomcat的出错日志如下:
--------------- T H R E A D ---------------
Current thread (0x00e7b800): JavaThread "Finalizer" daemon [_thread_in_native, id=1652, stack(0x032b0000,0x03300000)]
siginfo: ExceptionCode=0xc0000005, writing address 0x00000008
Registers:
EAX=0x00000008, EBX=0x008beb40, ECX=0x00000004, EDX=0x00000004
ESP=0x032ff7f4, EBP=0x032ff808, ESI=0x00000008, EDI=0x00000004
EIP=0x77557dd2, EFLAGS=0x00010216
Top of Stack: (sp=0x032ff7f4)
0x032ff7f4: 008beb40 00000000 037cab29 00e7b800
0x032ff804: 037cab28 032ff818 6f029855 00000004
0x032ff814: 008beb64 032ff82c 6f02d89c 008beb64
0x032ff824: 037cab28 00e7b928 032ff858 6f030914
0x032ff834: 008beb40 00e7b928 037cab28 00000000
0x032ff844: 00000000 00e7b928 ffffffff 032ff898
0x032ff854: 6d364d80 032ff898 6d364d8b 008beb40
0x032ff864: 00e7b800 008beb40 0174cd08 00e7b928
Instructions: (pc=0x77557dd2)
0x77557db2: 5f 5b 33 c0 5e 5d c2 04 00 90 90 90 90 90 8b ff
0x77557dc2: 55 8b ec 83 ec 0c 56 57 8b 7d 08 8d 77 04 8b c6
0x77557dd2: f0 0f ba 30 00 0f 83 1b fd 01 00 64 a1 18 00 00
0x77557de2: 00 8b 48 24 89 4f 0c c7 47 08 01 00 00 00 5f 33
Register to memory mapping:
EAX=0x00000008 is an unknown value
EBX=0x008beb40 is an unknown value
ECX=0x00000004 is an unknown value
EDX=0x00000004 is an unknown value
ESP=0x032ff7f4 is pointing into the stack for thread: 0x00e7b800
EBP=0x032ff808 is pointing into the stack for thread: 0x00e7b800
ESI=0x00000008 is an unknown value
EDI=0x00000004 is an unknown value
Stack: [0x032b0000,0x03300000], sp=0x032ff7f4, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x47dd2] RtlEnterCriticalSection+0x12
C [ODBC32.dll+0x19855] Ordinal286+0x19855
C [ODBC32.dll+0x1d89c] SQLDriverConnectW+0x660
C [ODBC32.dll+0x20914] SQLDisconnect+0x45
C [JdbcOdbc.dll+0x4d8b] Java_sun_jdbc_odbc_JdbcOdbc_disconnect+0x20
J sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(J)V
V [jvm.dll+0xfb88b]
V [jvm.dll+0x18d551]
V [jvm.dll+0xfb90d]
V [jvm.dll+0x96301]
V [jvm.dll+0x990c9]
C [java.dll+0x2100] Java_java_lang_ref_Finalizer_invokeFinalizeMethod+0x39
J java.lang.ref.Finalizer.runFinalizer()V
V [jvm.dll+0xfb88b]
V [jvm.dll+0x18d551]
V [jvm.dll+0xfba31]
V [jvm.dll+0xfba8b]
V [jvm.dll+0xb5e89]
V [jvm.dll+0x119b74]
V [jvm.dll+0x14217c]
C [MSVCR71.dll+0x9565] endthreadex+0xa0
C [kernel32.dll+0x44911] BaseThreadInitThunk+0x12
C [ntdll.dll+0x3e4b6] RtlInitializeExceptionChain+0x63
C [ntdll.dll+0x3e489] RtlInitializeExceptionChain+0x36
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J sun.jdbc.odbc.JdbcOdbc.disconnect(J[B)V
J sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(J)V
J sun.jdbc.odbc.JdbcOdbcConnection.close()V
J sun.jdbc.odbc.JdbcOdbcConnection.finalize()V
v ~StubRoutines::call_stub
J java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V
J java.lang.ref.Finalizer.runFinalizer()V
J java.lang.ref.Finalizer$FinalizerThread.run()V
v ~StubRoutines::call_stub
------解决思路----------------------
用jvisualvm把Tomcat线程dump出来:
jvisualvm在%JAVA_HOME%\bin下
------解决思路----------------------
我之前也出类似的,但后来换了一个TOMCAT 最近客户没啥反映。