Home  >  Q&A  >  body text

java - 当系统出现线程死锁时怎么处理?

使用jstack -l命令可以查看到死锁的线程,请问此时要怎么处理?线程要怎么杀掉呢?还是只能重启服务器?

PHP中文网PHP中文网2741 days ago542

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 10:50:45

    1. Keep the scene to facilitate subsequent troubleshooting. 2. Assess the severity of the deadlock. If it has affected the service, restart the service to see. 3. Research the cause of the deadlock, fix it, and go online again

    reply
    0
  • PHPz

    PHPz2017-04-18 10:50:45

    1. Kill
    2. Check the code
    3. Modify and test online

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:50:45

    In case of deadlock, you can only save the scene and then check the modifications and restart. Livelock may be restored automatically

    reply
    0
  • Cancelreply