3回复
4年前
jackson序列化导致jvm crash 问题
项目线上运行一段时间,jvm就crash掉,crash间隔不固定。并输出hs_err_pid.log文件,截取一部分日志,辛苦大佬们给看看原因或者给点排查思路,多谢
日志如下
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fce37899e55, pid=7898, tid=140505789400832
#
# JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# J 55051 C2 com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (9 bytes) @ 0x00007fce37899e55 [0x00007fce37899e20+0x35]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x00007fcb70034800): JavaThread "http-nio-8080-exec-64" daemon [_thread_in_Java, id=50260, stack(0x00007fca0da68000,0x00007fca0daa9000)]
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000028
Registers:
RAX=0x00000007c0230ab8, RBX=0x00007fcd25e78558, RCX=0x00000006c54d1438, RDX=0x0000000000000020
RSP=0x00007fca0daa6740, RBP=0x0000000000000000, RSI=0x00000005c029f4e0, RDI=0x00000005ce1e5a70
R8 =0x00000006c54d14c8, R9 =0x00000000000000c1, R10=0x00000005ce1e59e0, R11=0x000000060448b360
R12=0x0000000000000000, R13=0x00000005ce1e5a60, R14=0x00000000b898b17d, R15=0x00007fcb70034800
RIP=0x00007fce37899e55, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e
Top of Stack: (sp=0x00007fca0daa6740)
0x00007fca0daa6740: 00001f4000000013 00000006c54d1438
0x00007fca0daa6750: 00000006c543a948 00000006c54d1438
0x00007fca0daa6760: 0000000000000000 d9ba778fd9ba7649
0x00007fca0daa6770: 00000006c54ccbe0 00000006c54c3100
0x00007fca0daa6780: d9ba807500000000 00000006cdd3b760
0x00007fca0daa6790: 0000000000000000 00007fce34d61610
0x00007fca0daa67a0: 00000005c4a7c820 00000006cdd40428
0x00007fca0daa67b0: 00000006c54d1438 00000006cdd40450
0x00007fca0daa67c0: 00000006c54d14c8 00000006c54b7bb0
0x00007fca0daa67d0: 00000005ce1e59e0 00000006cdd398b8
0x00007fca0daa67e0: 00000000f8009378 00000005ce1ef620
0x00007fca0daa67f0: 00000006c54d1438 0000000000000020
0x00007fca0daa6800: 00000005c029f4e0 00000005cc5d9d18
0x00007fca0daa6810: 00000000d9ba76ec 00007fce34ea5608
0x00007fca0daa6820: 0000000000000000 00007fce3791c320
0x00007fca0daa6830: 00000006c54d14c8 00000006c54b7bb0
0x00007fca0daa6840: b9c3bab800000001 00007fcd70200000
0x00007fca0daa6850: 00000005ce1dd590 0000000200000022
0x00007fca0daa6860: 00000005ce1dd5c0 00000006c54d1438
0x00007fca0daa6870: 00000006cdd396b0 00000005c495c338
0x00007fca0daa6880: 00000006cdd39348 00000006cdd39740
0x00007fca0daa6890: 00000005cd902be0 00007fce3930e780
0x00007fca0daa68a0: 00000001f803f8cc 00000005cd902bb0
0x00007fca0daa68b0: 00007fcd70200000 00000006c54b79b0
0x00007fca0daa68c0: 00000006c54d1438 0000000000000000
0x00007fca0daa68d0: 00000006c54c2f68 00000000d8a96f76
0x00007fca0daa68e0: 00000006c54d14c8 0000000100000001
0x00007fca0daa68f0: 00000000d8a985ed 00000006c54b79b0
0x00007fca0daa6900: 00000006c54d1438 00007fce35eeaabc
0x00007fca0daa6910: 00007fcd70200000 00007fce323011b8
0x00007fca0daa6920: 00000005cc9d8410 00000005cc8ed278
0x00007fca0daa6930: 0000000000000000 00007fce34d61610
Instructions: (pc=0x00007fce37899e55)
0x00007fce37899e35: 1f 84 00 00 00 00 00 66 66 66 90 89 84 24 00 c0
0x00007fce37899e45: fe ff 55 48 83 ec 50 48 85 d2 0f 84 a9 04 00 00
0x00007fce37899e55: 44 8b 5a 08 41 81 fb da 02 00 f8 0f 85 06 08 00
0x00007fce37899e65: 00 48 89 54 24 10 44 8b 51 08 41 81 fa c1 f7 03
Register to memory mapping:
RAX=0x00000007c0230ab8 is pointing into metadata
RBX={method} {0x00007fcd25e78558} 'serialize' '(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V' in 'com/fasterxml/jackson/databind/ser/std/StringSerializer'
RCX=
[error occurred during error reporting (printing register info), id 0xb]
Stack: [0x00007fca0da68000,0x00007fca0daa9000], sp=0x00007fca0daa6740, free space=249k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J 55051 C2 com.fasterxml.jackson.databind.ser.std.StringSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (9 bytes) @ 0x00007fce37899e55 [0x00007fce37899e20+0x35]
J 19460 C2 com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (214 bytes) @ 0x00007fce34d61610 [0x00007fce34d61260+0x3b0]
J 40227 C2 com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (55 bytes) @ 0x00007fce3791c320 [0x00007fce3791bee0+0x440]
J 54054 C2 com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (11 bytes) @ 0x00007fce3930e780 [0x00007fce3930d7c0+0xfc0]
J 19460 C2 com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (214 bytes) @ 0x00007fce34d61610 [0x00007fce34d61260+0x3b0]
J 40227 C2 com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (55 bytes) @ 0x00007fce3791c320 [0x00007fce3791bee0+0x440]
J 19460 C2 com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (214 bytes) @ 0x00007fce34d61610 [0x00007fce34d61260+0x3b0]
J 40227 C2 com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (55 bytes) @ 0x00007fce3791c320 [0x00007fce3791bee0+0x440]
J 19460 C2 com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (214 bytes) @ 0x00007fce34d61610 [0x00007fce34d61260+0x3b0]
J 40227 C2 com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(Ljava/lang/Object;Lcom/fasterxml/jackson/core/JsonGenerator;Lcom/fasterxml/jackson/databind/SerializerProvider;)V (55 bytes) @ 0x00007fce3791c320 [0x00007fce3791bee0+0x440]
J 45203 C2 com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(Lcom/fasterxml/jackson/core/JsonGenerator;Ljava/lang/Object;)V (101 bytes) @ 0x00007fce3659d12c [0x00007fce3659cfc0+0x16c]
J 42928 C2 com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(Lcom/fasterxml/jackson/core/JsonGenerator;Ljava/lang/Object;)V (62 bytes) @ 0x00007fce37eb4514 [0x00007fce37eb4420+0xf4]
J 24076 C2 com.fasterxml.jackson.databind.ObjectMapper.writeValueAsBytes(Ljava/lang/Object;)[B (54 bytes) @ 0x00007fce3567cc5c [0x00007fce3567bc00+0x105c]
J 26700 C2 com.XXXXX.CCCCC.CCCCC.servlet.MyHttpServlet.writeResponse(Lcom/XXXXX/CCCCC/CCCCC/domain/http/HttpResponse;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V (94 bytes) @ 0x00007fce35d3e8b8 [0x00007fce35d3e5a0+0x318]
J 25989 C2 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (574 bytes) @ 0x00007fce35dc2090 [0x00007fce35dc0040+0x2050]
J 26287 C2 org.apache.tomcat.websocket.server.WsFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V (139 bytes) @ 0x00007fce33f69614 [0x00007fce33f695c0+0x54]
J 25989 C2 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (574 bytes) @ 0x00007fce35dc14a4 [0x00007fce35dc0040+0x1464]
J 25989 C2 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V (574 bytes) @ 0x00007fce35dc24f4 [0x00007fce35dc0040+0x24b4]
J 26284 C2 org.apache.catalina.core.StandardWrapperValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (1414 bytes) @ 0x00007fce34e9a904 [0x00007fce34e9a6c0+0x244]
J 26408 C2 org.apache.catalina.core.StandardContextValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (172 bytes) @ 0x00007fce345f734c [0x00007fce345f6b80+0x7cc]
J 28143 C2 org.apache.catalina.core.StandardHostValve.invoke(Lorg/apache/catalina/connector/Request;Lorg/apache/catalina/connector/Response;)V (406 bytes) @ 0x00007fce3612d7ac [0x00007fce3612c800+0xfac]
J 26676 C2 org.apache.catalina.connector.CoyoteAdapter.service(Lorg/apache/coyote/Request;Lorg/apache/coyote/Response;)V (660 bytes) @ 0x00007fce34b72a8c [0x00007fce34b72440+0x64c]
J 47495 C2 org.apache.coyote.http11.AbstractHttp11Processor.process(Lorg/apache/tomcat/util/net/SocketWrapper;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState; (1102 bytes) @ 0x00007fce388497f4 [0x00007fce38849260+0x594]
J 30024 C2 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; (856 bytes) @ 0x00007fce363fa7ec [0x00007fce363fa380+0x46c]
J 26038 C2 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(Ljava/nio/channels/SelectionKey;Lorg/apache/tomcat/util/net/NioEndpoint$KeyAttachment;)V (691 bytes) @ 0x00007fce35d393f8 [0x00007fce35d39340+0xb8]
J 26023 C2 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run()V (106 bytes) @ 0x00007fce35d33f28 [0x00007fce35d33d80+0x1a8]
J 36549 C2 java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V (225 bytes) @ 0x00007fce365abca0 [0x00007fce365abae0+0x1c0]
J 43809 C1 java.util.concurrent.ThreadPoolExecutor$Worker.run()V (9 bytes) @ 0x00007fce35a7bb44 [0x00007fce35a7ba40+0x104]
j org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()V+4
J 52032 C2 java.lang.Thread.run()V (17 bytes) @ 0x00007fce34f7726c [0x00007fce34f77220+0x4c]
v ~StubRoutines::call_stub
V [libjvm.so+0x68bbe6] JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x1056
V [libjvm.so+0x68c0f1] JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x321
V [libjvm.so+0x68c597] JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle, Symbol*, Symbol*, Thread*)+0x47
V [libjvm.so+0x7232d0] thread_entry(JavaThread*, Thread*)+0xa0
V [libjvm.so+0xa68f3f] JavaThread::thread_main_inner()+0xdf
V [libjvm.so+0xa6906c] JavaThread::run()+0x11c
V [libjvm.so+0x91cb88] java_start(Thread*)+0x108
C [libpthread.so.0+0x7851]
3655 阅读