Tomcat执行时报A fatal error has been detected by the Java Runtime Environment:SIGSEGV (0xb)

在Linux下,执行时Tomcat生成一份.log文件,Tomcat 的 log 文件也有报错,报的很清新:

#
# A fatal error has been detected by the Java Runtime Environment:
#
SIGSEGV (0xb) at pc=0x00007fd9da919509, pid=4388, tid=140573063231232
#
# 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:
# C  [libc.so.6+0xb9509]  readdir+0x29
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# //hs_err_pid4388.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

其实可能并不是你的 JVM 出错了,当然也有可能,网上由很多都把问题指向 JVM;

但是,在这里提一种情况:

如果你的代码使用了本地代码!

那么你要做的事情是仔细核对你Java代码里面声明本地方法的方法列表是否与本地C代码的方法列表一致!

(1)参数类型是否相通,要注意Java里面的一些类型在C中不存在或者不同,例如Java 的 Integer,String 等封装类,以及 short int 等的不同

(2)参数个数;


你可能感兴趣的:(Java学习笔记)