jvm crash,这方面不懂,google了一下午,求大神指导

神之小丑 2013-08-06
这是头:

引用

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaaabd93000, pid=5264, tid=1147955520
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x00002aaaabd93000
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#



这是thread
引用

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

Current thread (0x000000004692f800):  JavaThread "http-8080-157" daemon [_thread_in_Java, id=9146, stack(0x0000000044686000,0x00000000446c7000)]

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

Registers:
RAX=0x00000007e6625630, RBX=0x0000000712f357ec, RCX=0x00002aaaaa97b000, RDX=0x00000006f6e410c8
RSP=0x00000000446c55a8, RBP=0x00000007e6625630, RSI=0x00000007e6625630, RDI=0x0000000712f35780
R8 =0x00000007e6623850, R9 =0x00000000e43476a2, R10=0x0000000000000005, R11=0x00000006f4020348
R12=0x0000000000000000, R13=0x0000000000000000, R14=0x00000006f3c7cfa0, R15=0x000000004692f800
RIP=0x00002aaaabd93000, EFLAGS=0x0000000000010207, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00000000446c55a8)
0x00000000446c55a8:   00002aaaab9799c4 0000000000000001
0x00000000446c55b8:   0000000714d6ae68 0000000712f26dd0
0x00000000446c55c8:   0000000712f34aa8 0000000712f16428
0x00000000446c55d8:   00002aaaab72fbb8 00000007e6623850
0x00000000446c55e8:   0000000000001560 0000000712f26dd0
0x00000000446c55f8:   00002aaaab9cfbcc 0000000714d6ac38
0x00000000446c5608:   0000000712f34aa8 0000000712f34aa8
0x00000000446c5618:   0000000712f34aa8 00000006f3c7cf80
0x00000000446c5628:   0000000712f26dd0 0000000712f34aa8
0x00000000446c5638:   00000009e25e30fb 0000000712f187d8
0x00000000446c5648:   0000000714d8a9c0 00000000e2bce17f
0x00000000446c5658:   00002aaaab5f6184 0000000000000000
0x00000000446c5668:   00000006f3c7cf80 0000000700000000
0x00000000446c5678:   0000000712f21890 00000007e66239b0
0x00000000446c5688:   0000000712f26a78 0000000000000002
0x00000000446c5698:   0000003af408bf9d 0000000712f21890
0x00000000446c56a8:   00002aaaab700234 0000000051ff1b39
0x00000000446c56b8:   000000000007b03d 00000007132435b8
0x00000000446c56c8:   00002aaaab9b1355 0000000000000001
0x00000000446c56d8:   00002aaaab5984c8 0000000714dc56a8
0x00000000446c56e8:   0000000712f26dd0 0000000713243ae8
0x00000000446c56f8:   0000000713243ae8 e25e4dc400000000
0x00000000446c5708:   0000000712f26a78 0000000000000000
0x00000000446c5718:   0000000713243330 e29b16ee00000001
0x00000000446c5728:   0000000714d8b800 0000000000000001
0x00000000446c5738:   00002aaaab5f364c 0000000000000001
0x00000000446c5748:   00000007140305a0 0000000714dc5740
0x00000000446c5758:   0000000712f21890 0000000712f26de0
0x00000000446c5768:   00000001e29b8ae8 00000007e66247b0
0x00000000446c5778:   0000000712f26de0 0000000700000001
0x00000000446c5788:   00000007e6624798 0000000712855ba8
0x00000000446c5798:   0000000100000004 00000000e28060b4

Instructions: (pc=0x00002aaaabd93000)
0x00002aaaabd92fe0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00002aaaabd92ff0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00002aaaabd93000:   20 b9 80 b8 aa 2a 00 00 49 ba d0 51 a2 49 62 2b
0x00002aaaabd93010:   78 8d f7 f5 06 00 00 00 ff ff ff ff 80 8e 2f ff

Register to memory mapping:

RAX=0x00000007e6625630 is an oop
javax.net.ssl.SSLPeerUnverifiedException
- klass: 'javax/net/ssl/SSLPeerUnverifiedException'
RBX=0x0000000712f357ec is an oop
[Ljava.util.HashMap$Entry;
- klass: 'java/util/HashMap$Entry'[]
- length: 16
RCX=0x00002aaaaa97b000 is an unknown value
RDX=0x00000006f6e410c8 is an oop
java.lang.String
- klass: 'java/lang/String'
RSP=0x00000000446c55a8 is pointing into the stack for thread: 0x000000004692f800
RBP=0x00000007e6625630 is an oop
javax.net.ssl.SSLPeerUnverifiedException
- klass: 'javax/net/ssl/SSLPeerUnverifiedException'
RSI=0x00000007e6625630 is an oop
javax.net.ssl.SSLPeerUnverifiedException
- klass: 'javax/net/ssl/SSLPeerUnverifiedException'
RDI=0x0000000712f35780 is an oop
java.util.HashMap
- klass: 'java/util/HashMap'
R8 =0x00000007e6623850 is an oop
org.apache.tomcat.util.net.jsse.JSSESupport
- klass: 'org/apache/tomcat/util/net/jsse/JSSESupport'
R9 =0x00000000e43476a2 is an unknown value
R10=0x0000000000000005 is an unknown value
R11=0x00000006f4020348 is an oop
{instance class}
- klass: {other class}
R12=0x0000000000000000 is an unknown value
R13=0x0000000000000000 is an unknown value
R14=0x00000006f3c7cfa0 is an oop
[C
- klass: {type array char}
- length: 37
R15=0x000000004692f800 is a thread


Stack: [0x0000000044686000,0x00000000446c7000],  sp=0x00000000446c55a8,  free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  0x00002aaaabd93000


堆:

引用

Other Threads:
  0x00000000464ce800 VMThread [stack: 0x0000000041ca8000,0x0000000041da9000] [id=5270]
  0x000000004651a800 WatcherThread [stack: 0x0000000041322000,0x0000000041423000] [id=5277]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen      total 492864K, used 194758K [0x00000007da800000, 0x0000000800000000, 0x0000000800000000)
  eden space 449152K, 43% used [0x00000007da800000,0x00000007e6631a28,0x00000007f5ea0000)
  from space 43712K, 0% used [0x00000007f5ea0000,0x00000007f5ea0000,0x00000007f8950000)
  to   space 85440K, 0% used [0x00000007fac90000,0x00000007fac90000,0x0000000800000000)
PSOldGen        total 1482752K, used 299130K [0x0000000712800000, 0x000000076d000000, 0x00000007da800000)
  object space 1482752K, 20% used [0x0000000712800000,0x0000000724c1e820,0x000000076d000000)
PSPermGen       total 512000K, used 100994K [0x00000006f3400000, 0x0000000712800000, 0x0000000712800000)
  object space 512000K, 19% used [0x00000006f3400000,0x00000006f96a0928,0x0000000712800000)

Code Cache  [0x00002aaaab055000, 0x00002aaaabef5000, 0x00002aaaae055000)
total_blobs=4066 nmethods=3476 adapters=541 free_code_cache=35170176 largest_free_block=7232


arguments

引用

VM Arguments:
jvm_args: -Djava.util.logging.config.file=/webapp/apache-tomcat-6.0.35/conf/logging.properties -Xmx3800M -Xms2048M -Xmn600M -XX:PermSize=500M -XX:MaxPermSize=500M -Xss256K -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/webapp/apache-tomcat-6.0.35/endorsed -Dcatalina.base=/webapp/apache-tomcat-6.0.35 -Dcatalina.home=/webapp/apache-tomcat-6.0.35 -Djava.io.tmpdir=/webapp/apache-tomcat-6.0.35/temp
java_command: org.apache.catalina.startup.Bootstrap start
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=/usr/java/jdk1.6.0_26
PATH=/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/sf/bin:/usr/java/jdk1.6.0_26/bin:/home/sf/bin
LD_LIBRARY_PATH=/usr/java/jdk1.6.0_26/jre/lib/amd64/server:/usr/java/jdk1.6.0_26/jre/lib/amd64:/usr/java/jdk1.6.0_26/jre/../lib/amd64
SHELL=/bin/bash

Signal Handlers:
SIGSEGV: [libjvm.so+0x85f800], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x85f800], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x70e300], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x70e300], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x70e300], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x70e300], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x711110], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004




查了一下午,毫无头绪,第一次遇到这个问题,大致有几个疑问:

1.
引用

pc=0x00002aaaabd93000

# Problematic frame:
# C  0x00002aaaabd93000

Instructions: (pc=0x00002aaaabd93000)
0x00002aaaabd92fe0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00002aaaabd92ff0:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x00002aaaabd93000:   20 b9 80 b8 aa 2a 00 00 49 ba d0 51 a2 49 62 2b
0x00002aaaabd93010:   78 8d f7 f5 06 00 00 00 ff ff ff ff 80 8e 2f ff



因为不懂Instructions,不知道这块是撒意思,难道是jni?

2. 在Register to memory mapping: 里面 有ssl的错误,是否跟这块有关。

3.根据网上,看到一大堆都是gc的错,但是看这个log ,只有eden space 是最大是40% 应该不是这方面的问题吧。

8月1号以来 经常crash 不知道撒问题,,,急。。。
RednaxelaFX 2013-08-06
请把完整的日志文件上传到某处来看看吧。特别是栈的部分。
另外请参考我之前做的关于Java crash的演示稿。
SlideShare: http://www.slideshare.net/RednaxelaFX/java-crash
新浪微盘: http://vdisk.weibo.com/s/ey7-PRPWlAQ
里面我写了如何解读Instructions那段。
神之小丑 2013-08-07
RednaxelaFX 写道
请把完整的日志文件上传到某处来看看吧。特别是栈的部分。
另外请参考我之前做的关于Java crash的演示稿。
SlideShare: http://www.slideshare.net/RednaxelaFX/java-crash
新浪微盘: http://vdisk.weibo.com/s/ey7-PRPWlAQ
里面我写了如何解读Instructions那段。



谢谢R大,

完整的信息:

https://gist.github.com/KiddingOfGod/6170372

百度网盘

http://pan.baidu.com/share/link?shareid=2986809937&uk=2130746074
RednaxelaFX 2013-08-07
神之小丑 写道

代码的内容(甚至RIP的值)都看起来挺奇怪的,
$ echo "20 b9 80 b8 aa 2a 00 00 49 ba d0 51 a2 49 62 2b 78 8d f7 f5 06 00 00 00 ff ff ff ff 80 8e 2f ff" | ./udcli -64 -x -o 0x00002aaaabd93000
00002aaaabd93000 20b980b8aa2a     and [rcx+0x2aaab880], bh
00002aaaabd93006 0000             add [rax], al           
00002aaaabd93008 49bad051a249622b mov r10, 0x8d782b6249a251d0
                -788d            
00002aaaabd93012 f7f5             div ebp                 
00002aaaabd93014 06               invalid                 
00002aaaabd93015 0000             add [rax], al           
00002aaaabd93017 00ff             add bh, bh              
00002aaaabd93019 ffff             invalid                 
00002aaaabd9301b ff808e2fff       invalid                 

RIP指向的地址在HotSpot VM的code cache内,所以是HotSpot VM动态生成的代码。这里可能是一个code stub的开头,但内容好奇怪。我一时也看不出来这个是什么问题。
(跟楼主怀疑的“抛异常”应该没关系就是)

这个问题能重现不?换最新的JDK6来跑试试?
神之小丑 2013-08-07
RednaxelaFX 写道

RIP指向的地址在HotSpot VM的code cache内,所以是HotSpot VM动态生成的代码。这里可能是一个code stub的开头,但内容好奇怪。我一时也看不出来这个是什么问题。
(跟楼主怀疑的“抛异常”应该没关系就是)

这个问题能重现不?换最新的JDK6来跑试试?


这个是另外两次的log信息,

https://gist.github.com/KiddingOfGod/6172208

标题是7594的 是同样的。

现在在换新的JDK了,暂时稳定。。。
RednaxelaFX 2013-08-07
神之小丑 写道
这个是另外两次的log信息,

https://gist.github.com/KiddingOfGod/6172208

标题是7594的 是同样的。

现在在换新的JDK了,暂时稳定。。。

好神奇,7594这个的日志里RIP指向的地方都是0。果然RIP的值是坏的,但它指向的区域确实在code cache的已用区域里。如果我能访问出问题的服务器的话我可能会用CLHSDB去调查一下core dump。楼主要是有兴趣的话我可以把我可能会如何调查告诉你。
不过如果升到JDK6u45之后没问题的话就别管它了
神之小丑 2013-08-07
RednaxelaFX 写道
神之小丑 写道
这个是另外两次的log信息,

https://gist.github.com/KiddingOfGod/6172208

标题是7594的 是同样的。

现在在换新的JDK了,暂时稳定。。。

好神奇,7594这个的日志里RIP指向的地方都是0。果然RIP的值是坏的,但它指向的区域确实在code cache的已用区域里。如果我能访问出问题的服务器的话我可能会用CLHSDB去调查一下core dump。楼主要是有兴趣的话我可以把我可能会如何调查告诉你。
不过如果升到JDK6u45之后没问题的话就别管它了


我们这个问题服务器还没升,所以这个jdk还在,请老大不吝赐教,我这方面没接触过,直到出了问题后,我才接触,我现在是在尽量查撒原因,完全是看见新东西的一种见猎心喜,,,老大们是看见不出问题了就不管了。才不想去知道是什么原因造成的。这个服务器,暂时还没升,估计过不了几天就会全体替换了。。。

ps。现在服务器权限都被电信收走了,服务器上很多权限都没得。。。
Global site tag (gtag.js) - Google Analytics