一个Lambda引发的血案

背景
Java服务日常需求开发,测试,上线。
上线约3小时后,all service crash!!!

紧急处理
服务重新部署,暂时恢复正常。

dump日志

 AX=0x00000000ba1133b8 is an oop
  java.util.stream.Collectors$$Lambda$6/916975605
 - klass: 'java/util/stream/Collectors$$Lambda$6'
RBX={method} {0x00007f098c8c7480} 'identity' '(Ljava/lang/Object;)Ljava/lang/Object;' in 'sun/invoke/util/ValueConversions'
RCX=0x00007f0995078f40 is at begin+12 in a stub
MethodHandle::interpreter_entry::_linkToStatic [0x00007f0995078f34, 0x00007f0995078f58[ (36 bytes)
RDX=0x00000000c09a81f0 is an oop
java.lang.invoke.MemberName
 - klass: 'java/lang/invoke/MemberName'
RSP=0x00007f08f08892c0 is pointing into the stack for thread: 0x00007f09580ed250
RBP=0x00000000ba112fe0 is an oop
java.util.stream.Collectors$$Lambda$3/304395293
 - klass: 'java/util/stream/Collectors$$Lambda$3'
RSI=0x00000000ba1133b8 is an oop
java.util.stream.Collectors$$Lambda$6/916975605
 - klass: 'java/util/stream/Collectors$$Lambda$6'
RDI=0x00000000000018d8 is an unknown value
R8 =0x00000000200a29ae is an unknown value
R9 =0x0000003f84cb8ba7 is an unknown value
R10=0x00007f099413c000 is an unknown value
R11=0x00007f0997174fe4 is at entry_point+25156 in(nmethod*)0x00007f099716de90
R12=0x0000000000000000 is an unknown value
R13=0x00007f08f08892e0 is pointing into the stack for thread: 0x00007f09580ed250
R14=0x00000000c01f04d8 is an oop
org.springframework.transaction.interceptor.TransactionInterceptor
 - klass: 'org/springframework/transaction/interceptor/TransactionInterceptor'
R15=0x00007f09580ed250 is a thread

被同事看出和前一阵遇到的问题一样,JDK版本低导致,1.8.0_25-b17->1.8.0_162-b12
抱着怀疑的态度升级完成,监控运行情况。

查看总线程数是否还持续增常
pstree -p 进程ID | wc -l

查看Java堆栈信息
jstack 进程ID > test.log

配合awk匹配正则过滤其他信息,查看线程及状态(RUNNABLE 、WAITING、TIME_WAITING)是否有BLOCK。

系统健康运行!!!

你可能感兴趣的:(一个Lambda引发的血案)