關於報錯A fatal error has been detected by the Java Runtime Environment:


關於報錯A fatal error has been detected by the Java Runtime Environment:

 

一、報錯概覽

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=2608, tid=0x00002504
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) Client VM (25.131-b11 mixed mode windows-x86 )
# Problematic frame:
# C  0x00000000
#
# Core dump written. Default location: C:\Users\Administrator\Desktop\aerotop-led-project\hs_err_pid2608.mdmp
#
# 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.
#

  今天在運行java程序的時候報了如上所示的一個錯誤,然后查看日志,通過在百度上查詢,給出了幾種解決方案都不能徹底解決這個錯誤,依然會報錯,再向下看日志時發現jvm堆內存和元空間的使用情況,如下所示:

Heap:
 def new generation   total 44672K, used 13804K [0x05000000, 0x08070000, 0x0a550000)
  eden space 39744K,  30% used [0x05000000, 0x05bab018, 0x076d0000)
  from space 4928K,  37% used [0x07ba0000, 0x07d70208, 0x08070000)
  to   space 4928K,   0% used [0x076d0000, 0x076d0000, 0x07ba0000)
 tenured generation   total 98972K, used 59381K [0x0a550000, 0x105f7000, 0x15000000)
   the space 98972K,  59% used [0x0a550000, 0x0df4d4f0, 0x0df4d600, 0x105f7000)
 Metaspace       used 63522K, capacity 65876K, committed 66048K, reserved 66944K

  雖然沒有報OOM的錯誤,但是還是存在僥幸心理去改堆內存和元空間的大小,但是還是報錯。

 

二、解決方法:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000, pid=2608, tid=0x00002504
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) Client VM (25.131-b11 mixed mode windows-x86 )
# Problematic frame:
# C  0x00000000
#
# Core dump written. Default location: C:\Users\Administrator\Desktop\aerotop-led-project\hs_err_pid2608.mdmp
#
# 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.
#

  在最開始的日志消息中,發現了一個關鍵詞Problematic frame:,下面顯示的是文件名,於是定位到該文件中,發現是用於多個定時任務同時處理該方法造成的,導致報錯,修改程序后,解決問題。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM