zoukankan      html  css  js  c++  java
  • Tomcat的JVM经常挂掉,根据hs_err_pid23224.log这种日志文件,也没能发现具体是什么原因导致的

    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  SIGBUS (0x7) at pc=0x00007f1ae404fd50, pid=23224, tid=139753370498816
    #
    # JRE version: 7.0_17-b02
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy
    #
    # 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.sun.com/bugreport/crash.jsp
    #


    JVM致命错误日志(hs_err_pid.log)。
    为了core dumping,执行命令ulimit -c unlimited。


    参考博客园上的一篇文章
    http://www.cnblogs.com/qq78292959/archive/2012/05/08/2490443.html


    手动触发core:kill -6 pid(-6可以产生,默认的文件名是core.pid)。
    core文件很大,有200多Mb。


    分析对比最近3个月的“hs_err_pid23224.log”文件:
    Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy


    # Problematic frame:
    # v  ~StubRoutines::jint_disjoint_arraycopy


    # Problematic frame:
    # C  [libc.so.6+0x89f74]  __tls_get_addr@@GLIBC_2.3+0x89f74


    # Problematic frame:
    # C  [libc.so.6+0x89eb0]  __tls_get_addr@@GLIBC_2.3+0x89eb0
    # Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy


    # Problematic frame:
    # C  [libc.so.6+0x89f74]  __tls_get_addr@@GLIBC_2.3+0x89f74


    # Problematic frame:
    # V  [libjvm.so+0x66e040]  _Copy_arrayof_conjoint_jlongs+0x30
    # Problematic frame:
    # C  [libc.so.6+0x89e68]  __tls_get_addr@@GLIBC_2.3+0x89e68
    # Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy
    # Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy
    # Problematic frame:
    # v  ~StubRoutines::jbyte_disjoint_arraycopy


    不清楚,是不是内存不足导致的,手动设置了Tomcat的JVM内存参数。
    JAVA_OPTS="$JAVA_OPTS -Xms256m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=256m"


    现在只能等待下一次crash,看看core文件。


    鉴于Tomcat服务器现状,有必要监控内存情况,目前想到的3种方法:
    1.jconsole监控远程JVM,需要配置。
    2.web.xml配置Filter,监听内存情况。
    3.Tomcat自带的manager项目,可以留着,说不定用得上。


    下午又crash了一次,没有产生core文件,“ulimit ”命令没有生效。

    向阿里云提交了工单,看看专家能不能给点意见。

  • 相关阅读:
    Week14
    带你一文读懂Batch Normalization
    019_04简易相机
    019_03camera的调用
    019_02视频播放之VideoView
    019_01播放视频之SurfaceView
    018_04音效播放之MediaPlayer与SoundPool
    018_03简易美图
    018_02图片水印
    018_01图片特效
  • 原文地址:https://www.cnblogs.com/qitian1/p/6462862.html
Copyright © 2011-2022 走看看