How do I make a thread dump with MONO?(如何使用 MONO 进行线程转储?)
问题描述
如何在使用 MONO 运行的挂起应用程序中显示线程(堆栈跟踪)?
How can I show the threads (stacktraces) in a hanging application that run with MONO?
我知道我可以在 .NET 中使用托管堆栈资源管理器 (MSE) 完成此操作.因为应用程序只在 MONO 上挂起,所以我需要用 MONO 来完成.
I know that I can do it in .NET with the Managed Stack Explorer (MSE). Because the application hang only with MONO that I need to do it with MONO.
或者有什么其他的办法可以找到挂的地方吗?
Or there are any other ideas how I can find the place of hanging?
推荐答案
假设你使用的是 Linux/Unix,而不是 Windows,向你的程序发送一个 SIGQUIT 信号.这可以通过
Assuming you're on Linux/Unix, not Windows, send a SIGQUIT signal to your program. This can be done with
kill -QUIT $PID
其中 $PID 是您的程序的 pid.然后 Mono 会将所有线程的堆栈跟踪转储到标准输出.请注意,尽管该进程在此之后继续运行,但您不应期望它保持可用/稳定.
where $PID is the pid of your program. Mono will then dump stack traces of all threads to stdout. Note that although the process stays running after this, you should not expect it to remain usable/stable.
有关背景信息,请参阅 http://en.wikipedia.org/wiki/SIGQUIT.
See http://en.wikipedia.org/wiki/SIGQUIT for some background.
注意:线程转储不会在您运行 kill
命令的终端窗口中打印出来.它将出现在单声道进程的标准错误中.
Note: The thread dump will not print out in the terminal window where you ran the kill
command. It will appear in the stderr of the mono process.
这篇关于如何使用 MONO 进行线程转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 MONO 进行线程转储?


基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01