Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Sept/Oct 2019 Issue of The NT Insider available


Download PDF here: http://insider.osr.com/2019/ntinsider_2019_01.pdf

It’s a particularly BIG issue, too: 40 pages of technical goodness, ranging from WDF to Minifilters. Check it out.
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

The !object command is very slow

0xrepnz0xrepnz Member Posts: 6

Hey :)

I have a problem with the !object command - it runs very slow when I'm debugging the kernel with windbg.
The listing and entry finding process is slow. If I try to use the command with a specific object address it works fine. (unless it's a directory object)
It eventually finds and displays the object but it takes 1 second to process one object directory entry.

For example:

"!object \" - 1 second for each entry in the list.
"!object \PendingRenameMutex" - PendingRenameMutex is the first entry in the directory '\', so it takes 1 second to find the entry and another second to display it's information - a total of 2 seconds.
"!object \Driver" - This entry is one of the last entries in the directory - so it takes it 1 second for each entry before this entry - ~30 seconds to find "\Driver" than it takes 1 second for each entry in \Driver.

Thank you for your help!

kd> version
Windows 10 Kernel Version 17763 MP (1 procs) Free x64
Product: WinNt, suite: TerminalServer SingleUserTS
Built by: 17763.1.amd64fre.rs5_release.180914-1434
Machine Name:
Kernel base = 0xfffff807`2401e000 PsLoadedModuleList = 0xfffff807`24439610
Debug session time: Mon Oct 21 14:08:26.367 2019 (UTC + 3:00)
System Uptime: 0 days 0:03:53.135
Remote KD: KdSrv:[email protected]{<Local>},[email protected]{COM:Port=\\.\pipe\kd_Windows_10_x64,Baud=19200,Pipe,Timeout=4000}

Microsoft (R) Windows Debugger Version 10.0.18362.1 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

command line: '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe" -b -k com:pipe,resets=0,reconnect,port=\\.\pipe\kd_Windows_10_x64'  Debugger Process 0x744 
dbgeng:  image 10.0.18362.1, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbgeng.dll]
dbghelp: image 10.0.18362.1, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll]
        DIA version: 26213
Extension DLL search Path:
    <removed>
Extension DLL chain:
    dbghelp: image 10.0.18362.1, API 10.0.6, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll]
    ext: image 10.0.18362.1, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext\ext.dll]
    exts: image 10.0.18362.1, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\WINXP\exts.dll]
    kext: image 10.0.18362.1, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\winext\kext.dll]
    kdexts: image 10.0.18362.1, API 1.0.0, 
        [path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\WINXP\kdexts.dll]

Comments

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,183

    For whatever reason this command has always been very slow and it's made worse by a slow KD connection. Using VirtualKD or network debugging instead of a virtual COM port will help, but even then don't expect it to be particularly quick. For example, I'm using VirtualKD and it still took 28 seconds to run !object \Driver.

    If you frequently need your driver object address I recommend putting it in a global variable in your driver so you can easily grab it while debugging (e.g. dt mydrv!MyDriverObject).

    -scott
    OSR

  • GerhartGerhart Member Posts: 14

    You can try !ms_object command from SwishDbgExt WinDBG plugin (https://github.com/comaeio/SwishDbgExt/releases). In some cases that command gives fast results.
    And you can add issue to WinDBG Preview (https://github.com/microsoftfeedback/WinDbg-Feedback/issues). It will be good, if Microsoft can fix this problem in release build.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 21 Oct 2019 OSR Seminar Space & ONLINE
Internals & Software Drivers 18 Nov 2019 Dulles, VA
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 27 Apr 2020 OSR Seminar Space & ONLINE