Stack traces on Windows take more than half a second, even on fast machines.
You can see the delay in the timestamps in this sample output:
This stack trace took 0.877 seconds to generate, which is basically forever for a 3.3 GHz CPU.
The slow code is this line: src/mongo/util/stacktrace.cpp line 183:
The TRUE parameter is "fInvadeProcess":
The issue is that there are (on my machine) 33 DLLs mapped into the address space that mongod.exe is running in, and calling SymLoadModule64() for any of them is almost always a waste of time. Essentially every stack trace we print contains only locations in mongod.exe, so the time spent loading symbol information that will not be used is wasted.
The code should instead call SymLoadModule64() for the running .exe file and print only the module name for any address that is not in that file.