当 Java 调试时,什么可能导致我的进程挂起

发布于 2024-09-26 17:08:14 字数 344 浏览 3 评论 0原文

我有一个执行繁重处理的Java 服务器进程。它间歇性地停止处理,就像日志停止一样,活动停止,但进程仍然处于活动状态。

我调试的时候也遇到过几次这样的情况。当它发生时,我在调试器中点击暂停/中断,以便我可以检查正在运行的线程并查找停止的原因。但暂停按钮不会像平常那样闯入程序,只是停在那里。我使用 IntelliJ IDEA,但我不确定是 IDE 还是 JVM 出现了问题。

我尝试在问题发生之前闯入程序,它工作正常,进程停止,我可以检查线程列表。

有谁知道为什么 JVM 不会响应调试暂停/中断?它又是如何陷入这种境地的呢?我有点卡住了,因为我无法在无法看到程序损坏时的状态的情况下诊断这个问题。导致该问题的日志显示没有问题。

I have a Java server process which does heavy processing. It intermittently stops processing, as in the log stops, and activity ceases but the process is still active.

I have had this happen while debugging a few times. When it does I hit pause/break in the debugger so I can inspect the running threads and look for the cause of the stop. But the pause button doesn't break into the program like it normally does, just sits there. I use IntelliJ IDEA but I'm not sure if it will be the IDE or the JVM that is having the issue.

I try breaking into the program before the issue occurs and it works fine, process stops and I can check through the list of threads.

Does anyone know why a JVM would not respond to a debugging pause/break? And how it might get into that situation? I'm a bit stuck as I have no way of diagnosing this issue without being able to see the program state when it is broken. The logs leading up to the issue show no problems.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

月棠 2024-10-03 17:08:14

可以连接JVisualVM吗?你的CPU 利用率是100% 吗?我们遇到了平等问题。申请被停止。 JVisualVM 已不再连接。使用 jstack 的线程转储显示所有线程都已停止(多个线程转储之间没有差异),但 VM 消耗了 100% CPU。我们更换了硬件,问题就解决了。我们认为这是 RAM 问题,并且垃圾收集在无限循环中运行。但这只是一个理论。

如果您能解决问题,请更新我。

Can you connect with JVisualVM? Are your CPU on 100%? We had a equals problem. The application was stop. JVisualVM has not connect anymore. The thread dump with jstack show that all threads are stooped (no differences between multiple thread dumps) but the VM consume 100% CPU. We have change the hardware and the problem was solved. We thing it was a RAM problem and the garbage collection run in a endless loop. But this is only a theory.

Please update me if you can solve the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文