windbg

WinDBG - Finding the actual (unmanaged) exception

允我心安 提交于 2020-01-01 11:51:33
问题 I'm trying to find the actual exception in a managed-unmanaged mixed code. The problem is that I have a .Net class that catches all unhandled exceptions and then creates a dump, so when i look at the dump there's mixed managed-unmanaged code, and i can't really get to the actual unmanaged exception. And to make things worse, the .Net seems to have its own exception so !analyze -v gives me that exception. So, here is what I have: I can find where the exception happened (by finding the 1003f

WinDBG - Finding the actual (unmanaged) exception

倾然丶 夕夏残阳落幕 提交于 2020-01-01 11:51:11
问题 I'm trying to find the actual exception in a managed-unmanaged mixed code. The problem is that I have a .Net class that catches all unhandled exceptions and then creates a dump, so when i look at the dump there's mixed managed-unmanaged code, and i can't really get to the actual unmanaged exception. And to make things worse, the .Net seems to have its own exception so !analyze -v gives me that exception. So, here is what I have: I can find where the exception happened (by finding the 1003f

Analysing crash dump in windbg

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 05:26:05
问题 I am using a third party closed source API which throws an exception stating that "all named pipes are busy". I would like to debug this further (rather than just stepping through) so I can actually learn what is happening under the covers. I have taken a dump of this process using WinDbg. What commands should I now use to analyse this dump? Thanks 回答1: You could start doing as follows to get an overview of the exception: !analyze -v Now you could load the exception context record: .ecxr And

GFlags setting to catch heap corruption (other than Page Heap)?

百般思念 提交于 2020-01-01 02:32:47
问题 On one production site our application (*) crashes repeatedly, but non-reproducibly. Analyzing the crash dumps clearly shows that it's a heap corruption: The crashes are at different location, but always access violations inside kernel32!HeapFree / ntdll!RtlpLowFragHeapFree . Win Dbg !analyze -v also reports a heap corruption. What we have tried so far is to run the application with the GFlags option Page Heap. The problem is that the memory overhead of Page Heap is such that the application

Memory Leak, why are there so many ReaderWriterLock objects in my finalization queue?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 01:13:32
问题 I have a .NET windows service application with a memory leak. Overview: The service connects to another service via TCP, and writes data to a SQL server database. The service normally runs between 100 and 300 MB depending on how much data it has queued up. It generally takes 3 + days before I noticed the service's memory is getting out of hand, and will have a Out Of Memory exception within 2 weeks of running. I think the issue might be related to a massive number of objects that are not

How to use Windbg for opening a dump and launching some Windbg commands from the command prompt?

落花浮王杯 提交于 2019-12-31 07:32:36
问题 As mentioned in this other question, I'd like to start Windbg , open a dump, and launch some commands ( .load pykd.pyd and !py heap_stat.py ). I thought this would be easy, but even starting Windbg and open a crash dump seems not that easy, as you can see from following unsuccessful examples: Prompt>windbg.exe /? Prompt>windbg.exe --help Prompt>windbg.exe E:\Bugs\program.exe_181212_215503.dmp Prompt>windbg.exe -D E:\Bugs\program.exe_181212_215503.dmp Prompt>windbg.exe

WinDbg — TraceListener and Saturated ThreadPool

核能气质少年 提交于 2019-12-31 05:11:11
问题 I have a multithreaded .NET Windows Service that hangs intermittently -- maybe once every two weeks of 24/7 operation. When the hangs occurs the threadpool is completely saturated because calls to our custom tracelistener start blocking for some reason. There aren't any locks in the offending code nor anything blocking according to windbg, but they're definitely blocking somewhere. There aren't any exceptions on the stack either. There is a Thread.Sleep(1) that will occasionally be hit in the

Is it possible to call a method from WinDbg / SOS

青春壹個敷衍的年華 提交于 2019-12-30 09:27:22
问题 Is it possible to call managed method from windbg? Is there any .NET equivalent for .call ? Or how to use it to call managed method? I'm interested in attaching as a live session to a process on production (Release with no pdb) where is no possibility to use Visual Studio Debugger. 来源: https://stackoverflow.com/questions/7151301/is-it-possible-to-call-a-method-from-windbg-sos

Where can I get SOS for Windows 10 IoT?

南楼画角 提交于 2019-12-30 09:00:26
问题 I have a dump of a .NET Universal App running on Raspberry Pi 2, Windows 10 IoT: 0:000> vertarget Windows 10 Version 10240 MP (4 procs) Free ARM (NT) Thumb-2 Product: WinNt, suite: SingleUserTS Built by: 10.0.10240.16384 (th1.150709-1700) I see it uses coreclr like Silverlight did before. 0:000> lm vm coreclr start end module name 6e430000 6e7fd000 coreclr (export symbols) coreclr.dll Loaded symbol image file: coreclr.dll ... Timestamp: Thu Jul 16 21:37:39 2015 (55A88693) ... File version: 4

DEBUGGING BIBLE : Windbg ANSI Command

跟風遠走 提交于 2019-12-30 07:22:07
title {"SOS Commands"} body {"SOS Commands"} {"Load SOS and SOSEX"} {".loadby sos mscorwks;.load sosex"} {"Modules"} {"All Modules"} {"lm D sm"} {"Loaded Modules"} {"lmo D sm"} {"Loaded Modules (verbose)"} {"lmvo D sm"} {"Modules w/o symbols"} {"lme D sm"} {"Threads"} {"Managed Threads"} {"!threads"} {"Native Threads"} {"~"} {"Thread Pool Threads"} {"!threadpool"} {"Sync Block Deadlocks"} {"!dlk"} {"Stacks"} {"Current Managed Stack"} {"!clrstack"} {"Current Managed Stack Parameters and Locals"} {"!vars -w"} {"Current Native Stack"} {"kP"} {"Current Dump Stack"} {"!dumpstack"} {"All Managed