Defrag Tools: #22 - WinDbg - Memory Kernel Mode

Download this episode

Download Video

Description

In this episode of Defrag Tools, Andrew Richards, Chad Beeder and Larry Larsen continue looking at the Debugging Tools for Windows (in particular WinDbg). WinDbg is a debugger that supports user mode debugging of a process, or kernel mode debugging of a computer.

This installment goes over the commands used to show the memory used in a kernel mode debug session. We cover these commands:

  • !vm
  • !vm 1
  • !memusage 8
  • !poolused 2
  • !poolused 4
  • !poolfind <tag>
  • !pool <addr>
  • !pool <addr> 2
  • !pte

Make sure you watch Defrag Tools Episode #1 for instructions on how to get the Debugging Tools for Windows and how to set the required environment variables for symbols and source code resolution.

Resources:
Microsoft Windows SDK for Windows 7 and .NET Framework 4
Sysinternals LiveKD
Sysinternals RAMMap

Timeline:
[00:45] - Sysinternals LiveKD debug of the machine
[01:47] - Virtual Memory summary (!vm 1)
[05:10] - Sysinternals LiveKD live kernel dump (livekd.exe -m -o kernel.dmp)
[09:30] - Sysinternals RAMMap
[11:10] - Memory List summary (!memusage 8)
[16:15] - Pool Usage by Non-Paged Pool (!poolused 2)
[20:16] - Pool Tags (c:\debuggers\triage\pooltag.txt)
[28:06] - Pool Usage by Paged Pool (!poolused 4)
[29:27] - Pool issues lead to Bugchecks
[34:00] - Find Pool by Address (!pool <addr>)
[36:05] - Find Pool by Tag (!poolfind <tag>)
[40:30] - Page Table Entry (PTE) and Page Frame Number (PFN) (!pte <addr>)
[42:45] - Sometimes it is a physical hardware failure

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      JohnLudlow

      The video seems to bug out at 31:57.  Is anyone else having this issue or is it just me?

    • User profile image
      golnazal

      @JohnLudlow: what's happening with your video exactly? 

    • User profile image
      dcrearer

      Happy New Year!!! 

      Dudes I love this series its totally awesome... I feel you guy's are providing a great learning outlet especially for a beginner like myself. However at times the show gets hi jacked and it never gets back on course. I felt the past two episodes could have been a bit more linear and detailed.

      keep up the good work dudes.

    • User profile image
      windev

      @dcrearer:  Send us an email at defragtools@microsoft.com to explain what you exactly mean. We'd really like to hear your feedback in detail.

      Since we are making up the content (live) as we go to air, we may get off track from time-to-time. When we do, call us on it and we will revisit the episode.

    • User profile image
      igarvin

      Great series, very beneficial for the forensic troubleshooting connoisseur.

      Btw, concerning the 'bad' pages mentioned in !memusage, this value is typically not an accurate representation of actual bad pages. Pavel Lebedinsky, SDET at Microsoft, commented on this at the blog below:

      http://analyze-v.com/?p=558#comments

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.