[SERVER-48449] [Windows] Reuse debugger process for processes of same type in the hang-analyzer Created: 27/May/20  Updated: 06/Dec/22  Resolved: 28/Jan/22

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Vlad Rachev (Inactive) Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: tig-hanganalyzer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-48448 [Windows] Reuse debugger process for ... Closed
Related
related to SERVER-63125 Complete TODO listed in SERVER-48449 Closed
Assigned Teams:
Server Tooling & Methods
Participants:

 Description   

SERVER-46682 improved the performance of the hang-analyzer for linux processes. I couldn't get the same improvement to work for WinDbg so we decided to punt on it.

If anyone is experienced with WinDbg and really wants the performance increase, feel free to pick up this ticket or leave a comment with a suggestion for how to do it.



 Comments   
Comment by Vlad Rachev (Inactive) [ 27/May/20 ]

Here's an example command that the hang-analyzer tried to run:

['C:\\Program Files (x86)\\Windows Kits\\8.1\\Debuggers\\x64\\cdb.exe', '-c', '.symfix;!sym noisy;.symopt +0x10;.reload;!peb;lm;;!uniqstack -pn;!cs -l;.detach;.attach 4328;!peb;lm;;!uniqstack -pn;!cs -l;.detach;.attach 4928;!peb;lm;;!uniqstack -pn;!cs -l;.detach;q', '-p', '4276']

It was able to attach to the first process (4276, specified with -p) and print the stacktrace, but failed to attach to the other 2 (which I tried to attach to using .attach PID. Here was the error:

Bad symbols for NTDLL (error 3). Aborting.
Detached
Cannot debug pid 17192, Win32 error 0n87
    "The parameter is incorrect."
Unable to initialize target, Win32 error 0n87
No export peb found
                                                                                                          ^ Illegal thread error in '.symfix;!sym noisy;.symopt +0x10;.reload;!peb;lm;;!uniqstack -pn;!cs -l;.detach;.attach 4328;!peb;lm;;!uniqstack -pn;!cs -l;.detach;.attach 4928;!peb;lm;;!uniqstack -pn;!cs -l;.detach;q'

I also tried removing the -p option and using .attach for all 3 pids. When I did so, the command did not run at all and printed the help message. I tried running with -pv and -pr but got the same thing.

Generated at Thu Feb 08 05:17:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.