[Mono-list] How to find Deadlocks or dump Threadpool

Gonzalo Paniagua Javier gonzalo at ximian.com
Mon Sep 19 19:46:53 EDT 2005


On Thu, 2005-09-15 at 17:31 +0200, Bernhard Herzog wrote:
> Hello,
> 
> Is there a way to get the state of the threadpool of a running mono 
> application (to find deadlocks, i.e. which methods are hanging).

You can attach gdb (gdb --pid=MONOPID) and then 'thread apply all bt' to
get the stack traces of all the running threads. The ones that are
inside methods with no name might be running managed code. For those,
get the number (0xXXXXXXX) and execute 'call mono_print_method_from_ip
(0xXXXX)) to see the method name (and the line number if mono --debug).

-Gonzalo




More information about the Mono-list mailing list