吐嘈一下:tomcat7.0.29的websokcet还是不稳定啊,经常崩溃

opal 发布于 2012/09/05 11:42
阅读 4K+
收藏 2

【华为云1024程序员节·向云而生】预约直播 抽14件华为电子产品礼包!>>>

我只是发送纯文本而已,造成jvm崩溃(tcnative-1.dll),一天总要有个一两次,下面是崩溃日志:

============================================

#

# A fatal error has been detected by the Java Runtime Environment:

#

#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x48aa475d, pid=1244, tid=1516

#

# JRE version: 6.0_29-b11

# Java VM: Java HotSpot(TM) Server VM (20.4-b02 mixed mode windows-x86 )

# Problematic frame:

# C  [tcnative-1.dll+0x475d]

#

# 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 (0x49315400):  JavaThread "http-apr-80-exec-6" daemon [_thread_in_native, id=1516, stack(0x4b140000,0x4b190000)]

 

siginfo: ExceptionCode=0xc0000005, reading address 0x00000020

 

Registers:

EAX=0x00000000, EBX=0x4ac6d640, ECX=0x4b18d6e4, EDX=0x00000000

ESP=0x4b18d6c8, EBP=0x4b18f6e8, ESI=0x49315528, EDI=0x4b18d6e4

EIP=0x48aa475d, EFLAGS=0x00010212

 

Top of Stack: (sp=0x4b18d6c8)

0x4b18d6c8:   4b18d6e4 4b18d6e0 49315400 0455f6e0

0x4b18d6d8:   0455f6e0 4b18f744 00000001 00000081

0x4b18d6e8:   00000000 00000000 00000000 00000000

0x4b18d6f8:   4b18e070 00000000 00000001 61626abb

0x4b18d708:   4b18d74c 00000000 00000000 00000000

0x4b18d718:   0501a978 00000000 000001a0 00000000

0x4b18d728:   00000000 00000000 00000000 00000000

0x4b18d738:   04b440d0 00000000 00000000 00000000

 

Instructions: (pc=0x48aa475d)

0x48aa473d:   57 50 8b 45 1c 50 51 8b 8a 20 03 00 00 56 ff d1

0x48aa474d:   8b 53 18 8d 85 f8 df ff ff 50 8b 43 0c 8b cf 51

0x48aa475d:   8b 4a 20 50 ff d1 8b f0 eb 61 50 ff 15 9c 44 b6

0x48aa476d:   48 8b f8 83 c4 04 85 ff 75 16 8d 47 f4 5f 5e 5b

 

 

Register to memory mapping:

 

EAX=0x00000000 is an unknown value

EBX=0x4ac6d640 is an unknown value

ECX=0x4b18d6e4 is pointing into the stack for thread: 0x49315400

EDX=0x00000000 is an unknown value

ESP=0x4b18d6c8 is pointing into the stack for thread: 0x49315400

EBP=0x4b18f6e8 is pointing into the stack for thread: 0x49315400

ESI=0x49315528 is an unknown value

EDI=0x4b18d6e4 is pointing into the stack for thread: 0x49315400

 

 

Stack: [0x4b140000,0x4b190000],  sp=0x4b18d6c8,  free space=309k

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

C  [tcnative-1.dll+0x475d]  Java_org_apache_tomcat_jni_Socket_send+0x8d

j  org.apache.tomcat.jni.Socket.send(J[BII)I+0

j  org.apache.coyote.http11.upgrade.UpgradeAprProcessor.write(I)V+14

j  org.apache.coyote.http11.upgrade.UpgradeOutbound.write(I)V+5

j  org.apache.catalina.websocket.WsOutbound.doWriteBytes(Ljava/nio/ByteBuffer;Z)V+45

j  org.apache.catalina.websocket.WsOutbound.doWriteText(Ljava/nio/CharBuffer;Z)V+65

j  org.apache.catalina.websocket.WsOutbound.writeTextMessage(Ljava/nio/CharBuffer;)V+44

j  app.net.WebSocketClient.send(Ljava/lang/String;)V+10

j  app.net.WebSocketConfig.broadcast(Ljava/lang/String;)V+29

j  sun.reflect.GeneratedMethodAccessor23.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+40

j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6

j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161

j  app.net.WebSocketClient.onOpen(Lorg/apache/catalina/websocket/WsOutbound;)V+16

 

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)

j  org.apache.tomcat.jni.Socket.send(J[BII)I+0

j  org.apache.coyote.http11.upgrade.UpgradeAprProcessor.write(I)V+14

j  org.apache.coyote.http11.upgrade.UpgradeOutbound.write(I)V+5

j  org.apache.catalina.websocket.WsOutbound.doWriteBytes(Ljava/nio/ByteBuffer;Z)V+45

j  org.apache.catalina.websocket.WsOutbound.doWriteText(Ljava/nio/CharBuffer;Z)V+65

j  org.apache.catalina.websocket.WsOutbound.writeTextMessage(Ljava/nio/CharBuffer;)V+44

j  app.net.WebSocketClient.send(Ljava/lang/String;)V+10

j  app.net.WebSocketConfig.broadcast(Ljava/lang/String;)V+29

j  sun.reflect.GeneratedMethodAccessor23.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+40

j  sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6

j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161

j  app.net.WebSocketClient.G(Ljava/lang/String;Ljava/lang/String;)V+75

j  app.net.WebSocketClient.onOpen(Lorg/apache/catalina/websocket/WsOutbound;)V+16

j  org.apache.catalina.websocket.StreamInbound.onUpgradeComplete()V+22

j  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Lorg/apache/tomcat/util/net/SocketWrapper;Lorg/apache/tomcat/util/net/SocketStatus;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+215

j  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run()V+32

j  java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V+59

j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+28

j  java.lang.Thread.run()V+11

v  ~StubRoutines::call_stub

 

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

 

Java Threads: ( => current thread )

  0x486d5c00 JavaThread "http-apr-80-exec-10" daemon [_thread_blocked, id=2344, stack(0x4b2e0000,0x4b330000)]

  0x49176400 JavaThread "http-apr-80-exec-9" daemon [_thread_blocked, id=4056, stack(0x4b290000,0x4b2e0000)]

  0x48de3400 JavaThread "http-apr-80-exec-8" daemon [_thread_blocked, id=3232, stack(0x4b1e0000,0x4b230000)]

  0x48e06400 JavaThread "http-apr-80-exec-7" daemon [_thread_blocked, id=1832, stack(0x4b190000,0x4b1e0000)]

=>0x49315400 JavaThread "http-apr-80-exec-6" daemon [_thread_in_native, id=1516, stack(0x4b140000,0x4b190000)]

  0x48ecdc00 JavaThread "http-apr-80-exec-5" daemon [_thread_blocked, id=3860, stack(0x4b0f0000,0x4b140000)]

  0x487b1400 JavaThread "http-apr-80-exec-4" daemon [_thread_blocked, id=584, stack(0x4a860000,0x4a8b0000)]

  0x49146c00 JavaThread "http-apr-80-exec-3" daemon [_thread_blocked, id=1580, stack(0x4a810000,0x4a860000)]

  0x49879c00 JavaThread "http-apr-80-exec-2" daemon [_thread_blocked, id=1780, stack(0x49610000,0x49660000)]

  0x4904bc00 JavaThread "http-apr-80-exec-1" daemon [_thread_blocked, id=1788, stack(0x495c0000,0x49610000)]

  0x48fa0400 JavaThread "MySQL Statement Cancellation Timer" daemon [_thread_blocked, id=2700, stack(0x4b240000,0x4b290000)]

  0x4939b400 JavaThread "http-apr-80-AsyncTimeout" daemon [_thread_blocked, id=1384, stack(0x4b0a0000,0x4b0f0000)]

  0x48e3d800 JavaThread "http-apr-80-Acceptor-0" daemon [_thread_in_native, id=2692, stack(0x4b050000,0x4b0a0000)]

  0x487af400 JavaThread "http-apr-80-Sendfile-0" daemon [_thread_blocked, id=3244, stack(0x4b000000,0x4b050000)]

  0x48e54800 JavaThread "http-apr-80-CometPoller-7" daemon [_thread_blocked, id=2524, stack(0x4afb0000,0x4b000000)]

  0x49ac2400 JavaThread "http-apr-80-CometPoller-6" daemon [_thread_blocked, id=3248, stack(0x4af60000,0x4afb0000)]

  0x49087800 JavaThread "http-apr-80-CometPoller-5" daemon [_thread_blocked, id=3272, stack(0x4af10000,0x4af60000)]

  0x491f1c00 JavaThread "http-apr-80-CometPoller-4" daemon [_thread_blocked, id=4084, stack(0x4aec0000,0x4af10000)]

  0x48fd2400 JavaThread "http-apr-80-CometPoller-3" daemon [_thread_blocked, id=4068, stack(0x4ae70000,0x4aec0000)]

  0x49c33c00 JavaThread "http-apr-80-CometPoller-2" daemon [_thread_blocked, id=264, stack(0x4ae20000,0x4ae70000)]

  0x49002400 JavaThread "http-apr-80-CometPoller-1" daemon [_thread_blocked, id=2144, stack(0x4add0000,0x4ae20000)]

  0x492da400 JavaThread "http-apr-80-CometPoller-0" daemon [_thread_blocked, id=3508, stack(0x4ad80000,0x4add0000)]

  0x48764400 JavaThread "http-apr-80-Poller-7" daemon [_thread_in_native, id=1156, stack(0x4ad30000,0x4ad80000)]

  0x49ccd400 JavaThread "http-apr-80-Poller-6" daemon [_thread_in_native, id=3792, stack(0x4aae0000,0x4ab30000)]

  0x48730400 JavaThread "http-apr-80-Poller-5" daemon [_thread_in_native, id=2896, stack(0x4aa90000,0x4aae0000)]

  0x488fd400 JavaThread "http-apr-80-Poller-4" daemon [_thread_blocked, id=916, stack(0x4aa40000,0x4aa90000)]

  0x4908a000 JavaThread "http-apr-80-Poller-3" daemon [_thread_blocked, id=1372, stack(0x4a9f0000,0x4aa40000)]

  0x4957f400 JavaThread "http-apr-80-Poller-2" daemon [_thread_in_native, id=2060, stack(0x4a9a0000,0x4a9f0000)]

  0x49547400 JavaThread "http-apr-80-Poller-1" daemon [_thread_in_native, id=2596, stack(0x4a950000,0x4a9a0000)]

  0x49557c00 JavaThread "http-apr-80-Poller-0" daemon [_thread_in_native, id=2608, stack(0x4a900000,0x4a950000)]

  0x49587c00 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=2612, stack(0x4a8b0000,0x4a900000)]

  0x490a0800 JavaThread "Thread-5" daemon [_thread_blocked, id=3320, stack(0x497c0000,0x49810000)]

  0x487ce400 JavaThread "PooledByteBufferExpirer-0" daemon [_thread_blocked, id=296, stack(0x49770000,0x497c0000)]

  0x48f7b400 JavaThread "定时任务服务" daemon [_thread_blocked, id=744, stack(0x496d0000,0x49720000)]

  0x48dd2800 JavaThread "Thread-2" daemon [_thread_blocked, id=3256, stack(0x49680000,0x496d0000)]

  0x48736800 JavaThread "GC Daemon" daemon [_thread_blocked, id=780, stack(0x48d50000,0x48da0000)]

  0x48154400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3708, stack(0x48400000,0x48450000)]

  0x48152c00 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=3612, stack(0x483b0000,0x48400000)]

  0x4813ec00 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=324, stack(0x48360000,0x483b0000)]

  0x4813d400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3704, stack(0x48310000,0x48360000)]

  0x48156400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3864, stack(0x482c0000,0x48310000)]

  0x4812dc00 JavaThread "Finalizer" daemon [_thread_blocked, id=3772, stack(0x48270000,0x482c0000)]

  0x48129000 JavaThread "Reference Handler" daemon [_thread_blocked, id=3732, stack(0x48220000,0x48270000)]

  0x00357800 JavaThread "main" [_thread_in_native, id=3628, stack(0x003a0000,0x003f0000)]

 

Other Threads:

  0x48125400 VMThread [stack: 0x481d0000,0x48220000] [id=2724]

  0x48158400 WatcherThread [stack: 0x48450000,0x484a0000] [id=292]

 

VM state:not at safepoint (normal execution)

 

VM Mutex/Monitor currently owned by a thread: None

 

Heap

 PSYoungGen      total 152896K, used 102123K [0x32730000, 0x3d1d0000, 0x47c80000)

  eden space 131072K, 77% used [0x32730000,0x38aeafe8,0x3a730000)

  from space 21824K, 0% used [0x3bc80000,0x3bc80000,0x3d1d0000)

  to   space 21824K, 0% used [0x3a730000,0x3a730000,0x3bc80000)

 PSOldGen        total 349568K, used 10482K [0x07c80000, 0x1d1e0000, 0x32730000)

  object space 349568K, 2% used [0x07c80000,0x086bc930,0x1d1e0000)

 PSPermGen       total 41600K, used 20185K [0x03c80000, 0x06520000, 0x07c80000)

  object space 41600K, 48% used [0x03c80000,0x050365d8,0x06520000)

 

Code Cache  [0x00bc0000, 0x00e00000, 0x03bc0000)

 total_blobs=761 nmethods=592 adapters=122 free_code_cache=48102976 largest_free_block=7360

 

Dynamic libraries:

0x00400000 - 0x00424000 D:\JavaTomcat\jdk1.6.0_29\bin\java.exe

0x7c920000 - 0x7c9b6000 C:\WINDOWS\system32\ntdll.dll

0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll

0x61620000 - 0x6167e000 C:\WINDOWS\SYSTEM32\SYSFER.DLL

0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll

0x77e50000 - 0x77ee3000 C:\WINDOWS\system32\RPCRT4.dll

0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll

0x7c340000 - 0x7c396000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\msvcr71.dll

0x6db70000 - 0x6dfc8000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\server\jvm.dll

0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll

0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll

0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll

0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL

0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL

0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll

0x6d850000 - 0x6d85c000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\verify.dll

0x6d3d0000 - 0x6d3ef000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\java.dll

0x6d890000 - 0x6d89f000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\zip.dll

0x6d600000 - 0x6d609000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\management.dll

0x48aa0000 - 0x48bbc000 D:\JavaTomcat\apache-tomcat-7.0.29\bin\tcnative-1.dll

0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL

0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll

0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll

0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll

0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll

0x719c0000 - 0x719fe000 C:\WINDOWS\system32\MSWSOCK.dll

0x68000000 - 0x68036000 C:\WINDOWS\system32\rsaenh.dll

0x6d830000 - 0x6d838000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\sunmscapi.dll

0x765e0000 - 0x76673000 C:\WINDOWS\system32\CRYPT32.dll

0x76db0000 - 0x76dc2000 C:\WINDOWS\system32\MSASN1.dll

0x60fd0000 - 0x61025000 C:\WINDOWS\system32\hnetcfg.dll

0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll

0x759d0000 - 0x75a7f000 C:\WINDOWS\system32\USERENV.dll

0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\netapi32.dll

0x6d6b0000 - 0x6d6c3000 D:\JavaTomcat\jdk1.6.0_29\jre\bin\net.dll

0x76ef0000 - 0x76f17000 C:\WINDOWS\system32\DNSAPI.dll

0x76d30000 - 0x76d48000 C:\WINDOWS\system32\iphlpapi.dll

0x76f80000 - 0x76f88000 C:\WINDOWS\System32\winrnr.dll

0x76f30000 - 0x76f5c000 C:\WINDOWS\system32\WLDAP32.dll

0x76f90000 - 0x76f96000 C:\WINDOWS\system32\rasadhlp.dll

 

VM Arguments:

jvm_args: -Xms512m -Xmx1024m -Djava.awt.headless=true -Djava.util.logging.config.file=D:\JavaTomcat\apache-tomcat-7.0.29\conf\logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=D:\JavaTomcat\apache-tomcat-7.0.29\endorsed -Dcatalina.base=D:\JavaTomcat\apache-tomcat-7.0.29 -Dcatalina.home=D:\JavaTomcat\apache-tomcat-7.0.29 -Djava.io.tmpdir=D:\JavaTomcat\apache-tomcat-7.0.29\temp

java_command: org.apache.catalina.startup.Bootstrap start

Launcher Type: SUN_STANDARD

 

Environment Variables:

JAVA_HOME=D:\JavaTomcat\jdk1.6.0_29

JRE_HOME=D:\JavaTomcat\jdk1.6.0_29

CLASSPATH=D:\JavaTomcat\apache-tomcat-7.0.29\bin\bootstrap.jar;D:\JavaTomcat\apache-tomcat-7.0.29\bin\tomcat-juli.jar

PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel

 

 

 

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

 

OS: Windows XP Build 2600 Service Pack 3

 

CPU:total 2 (1 cores per cpu, 2 threads per core) family 15 model 6 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht

 

Memory: 4k page, physical 2094632k(1135644k free), swap 4032552k(2799220k free)

 

vm_info: Java HotSpot(TM) Server VM (20.4-b02) for windows-x86 JRE (1.6.0_29-b11), built on Oct  3 2011 00:51:46 by "java_re" with MS VC++ 7.1 (VS2003)

 

time: Wed Sep 05 10:17:58 2012

elapsed time: 6304 seconds

 

加载中
0
mallon
mallon
哈哈Java的东西太复杂...
0
yak
yak
用resin
0
哈哈一个
哈哈一个
呵呵,太棒了,我也是在搞websocket的东西,每天都有报错,升级到了30版本也不行,正在考虑是否换用jetty呢。
0
哈哈一个
哈哈一个
7.032还是一样出问题,太恼火了
0
opal
opal
已经上线了,哈哈
0
小白薯
小白薯
Windows?和其他软件有冲突?
菠萝啊哈哈
菠萝啊哈哈
直接把那个报错的dll文件删除??
opal
opal
把bin目录下的dll文件删除或改名就没有问题了
0
菠萝啊哈哈
菠萝啊哈哈
终于啊终于让我找到同一个错误的帖子了~~~~热泪啊~~~
0
菠萝啊哈哈
菠萝啊哈哈
请问楼主的终极解决办法
0
opal
opal

终极的解决方法就是:

不要使用apr


0
菠萝啊哈哈
菠萝啊哈哈

引用来自“opal”的答案

终极的解决方法就是:

不要使用apr


高手,最后就是如此解决的,只是当时么有看懂,后面将web.xml里面的<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
返回顶部
顶部