linux - 生产环境,Java进程异常退出,无jvm错误日志,如何查找原因?
迷茫
迷茫 2017-04-17 12:59:41
0
5
1066

如题,线上centos64位系统, jdk1.6, 在负载极小的时间段,出现Java进程突然退出的现象,并且无任何错误日志(包括@AntonyBi提到的hs_err_pid.log)。请教如何分析定位并解决此问题。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
巴扎黑

Redirect the output to the file when starting java, java xxx >> logfile 2>&1; echo $? >> logfile. In addition, sometimes java exits coredump, ulimit -c opens core.

巴扎黑

In this case, the program usually crashes, so it cannot be seen in the log.

But you will see the hs_err_pid.log file in the directory where the calling program is running, which contains the jvm information and stack information when it crashed, which can help you analyze the cause of the crash.

阿神

Sometimes a JNI error will kill the entire process. This depends on experience. .

小葫芦

Is there a request log? You can see what the last request was before exiting. Do some more stress testing to see if it crashes.

阿神

sudo dmesg -T | grep "(java)"
You’re welcome~

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template