JVM线程转储包含没有锁定线程的监视器 [英] JVM Thread dumps containing monitors without locking threads

查看:101
本文介绍了JVM线程转储包含没有锁定线程的监视器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示线程等待锁定监视器的JVM线程转储的原因是什么,但监视器没有相应的锁定线程?

What could be the cause of JVM thread dumps that show threads waiting to lock on a monitor, but the monitors do not have corresponding locking threads?

Windows 2003上的Java 1.5_14

Java 1.5_14 on Windows 2003

推荐答案

做那些等待线程等待,或者他们最终会继续?

Do those waiting threads wait for ever, or do they eventually proceed?

如果是后者,可能是垃圾收集器持有锁。

If the latter, it may be that the lock is held by the garbage collector.

您可以在java命令行上添加参数 -verbose:gc with -XX:+ PrintGCDetails ,以便在GC发生时告知。如果gc活动与你的减速一致,则可能表明这是问题所在。

You can add the arguments -verbose:gc with -XX:+PrintGCDetails on your java command line to be told when GCs are occurring. If gc activity coincides with your slowdowns it may indicate that this is the problem.

这里有一些有关垃圾收集的信息

这篇关于JVM线程转储包含没有锁定线程的监视器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆