windbgsossosex

Error with !runaway command


I am looking a dump file collected from production environment for high cpu usage. I ran !threadpool and !runaway command as follows

0:000> !ThreadPool
CPU utilization: 100%
Worker Thread: Total: 6 Running: 2 Idle: 4 MaxLimit: 32767 MinLimit: 4
Work Request in Queue: 0
--------------------------------------
Number of Timers: 8
--------------------------------------
Completion Port Thread:Total: 8 Free: 3 MaxFree: 8 CurrentLimit: 8 MaxLimit: 1000 MinLimit: 4

0:000> !runaway
ERROR: !runaway: extension exception 0x80004002.
    "Unable to get thread times - dumps may not have time information"

I want to know what threads are consuming most cpu time but I cannot run !runaway command. Are there any other commands in sos, sosex or any other extension that could be helpful in this case?


Solution

  • You need a tool that adds the necessary information to the dump.

    In WinDbg, the .dump command has the /mt MiniOption, which

    Adds additional thread information to the minidump. This includes thread times, which can be displayed by using the !runaway extension or the .ttime (Display Thread Times) command when debugging the minidump.

    (Emphasis: links in WinDbg)

    The t option is included in the a option as well, so .dump /ma is fine as well.

    To find out whether or not your dump has that information, use the undocumented command .dumpdebug like this:

    .shell -ci ".dumpdebug" findstr "MiniDump"
    

    If there is a line

    1000 MiniDumpWithThreadInfo
    

    the information is contained and you have a different issue. If it's not there, the time info is not available.

    Most other tools I know do not provide such detailed settings, so it's more or less luck, whether this info is included or not.