MemoScope.Net icon indicating copy to clipboard operation
MemoScope.Net copied to clipboard

Automatic deadlocks detection

Open gubenkoved opened this issue 8 years ago • 4 comments

It would be very helpful to exercise WinDbg SOSEX plugin's automatic deadlock detection mechanism (command !dlk). It will allow catching "easy" deadlocks (which is majority of cases) very quickly.

Details about SOSEX WinDbg extension: http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx

Example of raw output of SOSEX !dlk:

0:164> !dlk
Examining SyncBlocks...
Scanning for ReaderWriterLock(Slim) instances...
Scanning for holders of ReaderWriterLock locks...
Scanning for holders of ReaderWriterLockSlim locks...
Examining CriticalSections...
Scanning for threads waiting on SyncBlocks...
Scanning for threads waiting on ReaderWriterLock locks...
Scanning for threads waiting on ReaderWriterLocksSlim locks...
Scanning for threads waiting on CriticalSections...
*DEADLOCK DETECTED*
CLR thread 0xd4 holds the lock on SyncBlock 00000249f2abbd98 OBJ:00000247ab61ae28[System.Object]
...and is waiting for the lock on SyncBlock 00000249ed62bd08 OBJ:00000248ab70e1b0[log4net.Appender.RollingFileAppender]
CLR thread 0xce holds the lock on SyncBlock 00000249ed62bd08 OBJ:00000248ab70e1b0[log4net.Appender.RollingFileAppender]
...and is waiting for the lock on SyncBlock 00000249f2abbd98 OBJ:00000247ab61ae28[System.Object]
CLR Thread 0xd4 is waiting at log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)(+0xf IL,+0x46 Native)
CLR Thread 0xce is waiting at System.Diagnostics.TraceInternal.WriteLine(System.String)(+0x17 IL,+0x86 Native) [f:\dd\NDP\fx\src\compmod\system\diagnostics\TraceInternal.cs @ 460,56]

gubenkoved avatar Feb 11 '18 06:02 gubenkoved

Hi,

Thanks for the idea. Today, there is already something to see deadlocks with Blocking objects module.

I agree it's not as automatic as the feature you describe. Unfortunately, I don't have a lot of time to work on Memoscope at the moment so I keep this feature request in my todo list (unless someone sends me a pull request).

fremag avatar Feb 25 '18 15:02 fremag

It would be very helpful to exercise WinDbg SOSEX plugin's automatic deadlock detection mechanism (command !dlk). It will allow catching "easy" deadlocks (which is majority of cases) very quickly.

Details about SOSEX WinDbg extension: http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx

Example of raw output of SOSEX !dlk:

Looks like http://www.stevestechspot.com isn't working anymore. Could you share this library?

EwgenyFedotov avatar Jan 31 '20 10:01 EwgenyFedotov

It would be very helpful to exercise WinDbg SOSEX plugin's automatic deadlock detection mechanism (command !dlk). It will allow catching "easy" deadlocks (which is majority of cases) very quickly. Details about SOSEX WinDbg extension: http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx Example of raw output of SOSEX !dlk:

Looks like http://www.stevestechspot.com isn't working anymore. Could you share this library?

There must have been a glitch on the site, it works for me now.

gubenkoved avatar Jan 31 '20 15:01 gubenkoved

Details about SOSEX WinDbg extension: http://www.stevestechspot.com/SOSEXANewDebuggingExtensionForManagedCode.aspx Example of raw output of SOSEX !dlk:

Looks like http://www.stevestechspot.com isn't working anymore. Could you share this library?

There must have been a glitch on the site, it works for me now.

Home page works for me as well, but all links are broken or something. It is not possible to download any extension. For instance www.stevestechspot.com/downloads/sosex_64.zip doesn't work.

EwgenyFedotov avatar Feb 03 '20 13:02 EwgenyFedotov