如何在Eclipse远程调试器中找到有问题的线程? [英] How to find problematic thread in Eclipse remote debugger?

查看:185
本文介绍了如何在Eclipse远程调试器中找到有问题的线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在jboss应用程序服务器中运行的Web应用程序(但是它不是jboss特定的,所以我们也可以认为它是一个tomcat或任何其他服务器)。现在我有一个线程似乎处于死锁状态的问题。它一直使用100%的CPU。我启动了启用调试端口的服务器,我可以将Eclipse连接到它。但问题是:有很多线程运行。我如何找到正确的线程?我知道进程ID(从Linux顶命令),但我认为这不会有帮助。我真的要分开打开每个线程,并检查他们正在做什么?或者是否有一种方法来过滤线程最活跃或类似于Eclipse的线程?

解决方案

您可以尝试生成线程转储(CTRL + Break,如此线程)。



或者您可以将JConsole附加到远程会话(因此现在将Eclipse放在一边),监视线程并生成线程转储。



alt text http://www.jroller .com / dumpster / resource / tdajconsole.png


I have a web application running in a jboss application server (But it is not jboss specific so we could also assume it is a tomcat or any other server). Now I have the problem that one thread seems to be in dead-lock situation. It uses 100% CPU all the time. I have started the server with enabled debug port and I can connect Eclipse to it. But the problem is: There are a lot of threads running. How can I find the right thread? I know the process id (from Linux "top" command) but I think this will not help. Do I really have to open each thread separately and check what they are currently doing? Or is there a way to filter the threads for "most active" or something like that in Eclipse?

解决方案

You can try and generate a thread dump (CTRL+Break as shown in this thread).

Or you could attach a JConsole to the remote session (so leaving Eclipse aside for now), monitor the threads and generate a thread dump.

alt text http://www.jroller.com/dumpster/resource/tdajconsole.png

这篇关于如何在Eclipse远程调试器中找到有问题的线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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