Decrypt my World

Cryptography, Security, Debugging and more!

Browse by Tags

Tagged Content List
  • Blog Post: Get-WmiObject : The type initializer for 'System.Management.MTAHelper' threw an exception

    Hi all, Sometime ago a customer of mine had some problems in his x64 machine when running WMI queries in Powershell . Take for instance the following query : " Get-WMIObject Win32_LogicalDisk " It failed with the following error : " Get-WmiObject : The type initializer for...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Locks

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Breaking on an Exception. Part 2 . LOCKS · We can see threads waiting for managed locks : All managed objects have a syncblock (4 bytes) before their Method Table and properties. It can hold locking information...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Breaking on an Exception. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Breaking on an Exception. Part 1 . BREAKING ON AN EXCEPTION. Part 2 What happens if !PrintException doesn’t return anything, or when we break (i.e. with a breakpoint or manually – Ctrl+Break) we can’t see mscorwks...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Breaking on an Exception. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Managed Heap. Part 5 . BREAKING ON AN EXCEPTION. Part 1 We can only break on exceptions when doing live debugging, but many of the commands explained here can be used when doing dump analysis, too. · Exceptions...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Managed Heap. Part 5

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Managed Heap. Part 4 . MANAGED HEAP. Part 5 · We can troubleshoot Loader Heap issues : An assembly can’t be unloaded while the AppDomain where it was created is still alive. We will get a memory leak if we keep...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Managed Heap. Part 4

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Managed Heap. Part 3 . MANAGED HEAP. Part 4 · We can troubleshoot Heap issues : These are some of the important performance counters we can check with Performance Monitor when having memory issues with .NET...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Managed Heap. Part 3

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Managed Heap. Part 2 . MANAGED HEAP. Part 3 · We can take a look to which objects reference which objects in the heap: We may see many objects in the heap that we think should have been cleaned up already. If...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Managed Heap. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Managed Heap. Part 1 . MANAGED HEAP. Part 2 · We can take a look to the objects in the heap : We can see all objects in the heap: 0:004> !DumpHeap Address MT Size 7b463c40 790fd0f0 12 7b463c4c...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Managed Heap. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Thread Stacks. Part 2 . MANAGED HEAP. Part 1 .NET won’t use the NT Heap . It saves some virtual memory for its own managed heap instead. Objects in the managed heap are part of a Garbage Collector (GC) generation...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Thread Stacks. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Thread Stacks. Part 1 . THREAD STACKS. Part 2 · We can inspect the objects with unmanaged commands : The reference to an object points to the method table (which is a pointer to the table with the method...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Thread Stacks. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Threads. Part 2 . THREAD STACKS. Part 1 · We can take a look to the objects in the stack : The CLR is stack-based. All references to objects are in the stack , but objects themselves are in the managed heap...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Threads. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Threads. Part 1 . THREADS. Part 2 · We can see all .NET related threads in our process: There are different types of .NET threads : finalizer, GC, debugger, timer, threadpool, primary and background threads...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Threads. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Call Stacks. Part 3 . THREADS. Part 1 · We can see all threads in our process: If we reach a breakpoint or break on an exception , WinDbg command prompt shows the ID of the thread which reached the breakpoint...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Call Stacks. Part 3

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Call Stacks. Part 2 . CALL STACKS. Part 3 · Let's review previous commands: Let’s see a sample where the debugger broke when “PlayWithArray” raised an exception. We can use the return address of the function...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Call Stacks. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Call Stacks. Part 1 . CALL STACKS. Part 2 · We can see the source code of a method in the call stack: First of all, Source Code mode has to be enabled. We’ll need symbols and source code files correctly configured...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Call Stacks. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 3 . CALL STACKS. Part 1 · We can see the call stack of the current thread : When the debugger breaks for any reason (i.e. we reached a breakpoint, we got an exception or we stopped...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 3

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 2 . SETTING A BREAKPOINT. Part 3 · We can step through the code and do some live debugging : When we reach a breakpoint, for instance, we can go step by step through the code as with any...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 2

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 1 . SETTING A BREAKPOINT. Part 2 · We set the breakpoint : Regardless if method is jitted, we can set a breakpoint on a method by using its Method Descriptor : 0:004> !BPMD -md...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Setting a Breakpoint. Part 1

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Preparing the Environment . SETTING A BREAKPOINT. Part 1 We can only set breakpoints when doing live debugging, but many of the commands explained here can be used when doing dump analysis, too. · We find the method...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Preparing the Environment

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Help . PREPARING THE ENVIRONMENT Let’s assume we’ve attached WinDbg to our problematic .NET application just when it starts, so .NET dlls are not loaded in the process yet. · We verify the...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Help

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Prerequisites . HELP · I won’t explain every single detail on WinDbg or debugger extension commands . I don’t want to duplicate much info. I will mainly focus on which commands to use and how to use them depending...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Prerequisites

    Hi all, This post is a continuation of MANAGED DEBUGGING with WINDBG. Introduction and Index . PREREQUISITES · I won’t explain the following basic concepts here, so it’s better if you know them before trying to read these posts: ü User Mode vs. Kernel Mode . ü Differences between...
  • Blog Post: MANAGED DEBUGGING with WINDBG. Introduction and Index

    Hi all, The other day I posted the list of commands I use on WinDbg when debugging .NET issues : SOS Cheat Sheet (.NET 2.0/3.0/3.5) . In the next few posts I will provide you with additional info and samples on how to use those commands. INDEX 1. Prerequisites 2. Help 3. Preparing the...
  • Blog Post: SOS Cheat Sheet (.NET 2.0/3.0/3.5)

    Hi all, This is the list of commands related to the SOS extension that I use when debugging with WinDbg most of the .NET issues I face: ======================================================================== HELP ======================================================================== .hh ...
  • Blog Post: The use of MSXML is not supported in .NET applications

    Hi all, The other day I was working with a customer of mine on a .NET application which was suffering from a memory leak . The weird thing was that the application could run just fine for 10 days in a row before the memory began growing and growing. What was going on? Why was the Garbage Collector...
Page 1 of 2 (31 items) 12