zoukankan      html  css  js  c++  java
  • 事故分析

      

    先dump内存看看。

    将网关层应用的内存dump下来后,发现了问题: 

    "qtp1056944384-232" prio=10 tid=0x00007f54900d0800 nid=0x63b3 waiting for monitor entry [0x00007f54492d0000]
       java.lang.Thread.State: BLOCKED (on object monitor)
    	at org.apache.log4j.Category.callAppenders(Category.java:205)
    	- waiting to lock <0x00000007e81c4830> (a org.apache.log4j.spi.RootLogger)
    	at org.apache.log4j.Category.forcedLog(Category.java:391)
    	at org.apache.log4j.Category.log(Category.java:856)
    	at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:368)
    

     总计有200多个log4j的线程在等待锁"0x00000007e81c4830",而这把锁被谁持有呢?通过搜索,找到以下dump信息:

    "qtp1056944384-218" prio=10 tid=0x00007f54800bb800 nid=0x63a5 runnable [0x00007f544a0de000]
       java.lang.Thread.State: RUNNABLE
    	at java.net.SocketOutputStream.socketWrite0(Native Method)
    	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    	at java.net.SocketOutputStream.write(SocketOutputStream.java:141)
    	at net.logstash.log4j.SocketAppender.append(SocketAppender.java:190)
    	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
    	- locked <0x00000007e8210868> (a net.logstash.log4j.SocketAppender)
    	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
    	at org.apache.log4j.Category.callAppenders(Category.java:206)
    	- locked <0x00000007e81c4830> (a org.apache.log4j.spi.RootLogger)
    	at org.apache.log4j.Category.forcedLog(Category.java:391)
    	at org.apache.log4j.Category.log(Category.java:856)
    	at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:368)
    

     第218号线程持有了锁"0x00000007e81c4830",然后其它log4j的线程都在等待这把锁的释放

    http://www.cnblogs.com/suxuan/p/5041420.html

    --希望是生命的瑰丽朝霞,我们应当在希望中生活,并在希望中奋进,去开拓我们的人生之路。
  • 相关阅读:
    js用currentStyle和getComputedStyle获取css样式(非行间)
    XMLHttpRequest Level 2 使用指南
    image-set实现Retina屏幕下图片显示[转载]
    Png的秘密
    css清除&闭合浮动
    2016学习计划
    提高性能及操作硬件的能力
    新兵易学,老兵易用----C++(C++11的学习整理---如何减少代码量,加强代码的可读性)
    CV限制符--C++
    能ping通网络,也正常连接,就是打不开网页,无法访问网络
  • 原文地址:https://www.cnblogs.com/nulisaonian/p/6053227.html
Copyright © 2011-2022 走看看