#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007f64c1114d10, pid=18249, tid=0x00007f6494667700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_211-b12) (build 1.8.0_211-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.211-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libzip.so+0x11d10]  newEntry.isra.4+0x60
#
# 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
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

重点有两句

文章的重点
Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

bug的主要原因
SIGBUS (0x7) at pc=0x00007f64c1114d10, pid=18249, tid=0x00007f6494667700

ulimit -c unlimited

看了下日志里面提示了说运行一个命令,也就是 ulimit -c unlimited,这个命令由于没用过,因此就百度了一下.

ulimit 命令,又牵扯出另外一个新东西:Linux core文件

Linux core文件

在一个程序崩溃是,它一般会在特定目录(一般是当前目录下)生成一个core文件。core文件仅仅是一个内存映像(同时加上调试信息),主要用来程序调试。

core文件生成是有条件,一般Linux是关掉的.可以通过 ulimit -a 这个命令进行查看
在这里插入图片描述
可以看到core file size这个参数它是0 因此程序在崩溃的时候是写不了core文件的.

因此我们可以执行一下tomcat日志里面给的命令,把它设置成没有限制大小的.这样就在崩溃的时候就会生成一个core文件了.如果要永久生效,需要重启服务器.

然后就是对core文件进行调试.调试到时候再重新编写一遍关于调试的.

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐