The question may be a bit awkward, but here's my detailed problem:
Currently I'm looking into setting up SysInternals' procdump.exe to monitor an application of ours that exhibits spurious disappearances -- that is, the user reports that the application is simply "gone" without any trace after a short visible hang of the application's window.
My first idea was to run procdump -e -x . MyApp.exe
which would record a crash dump when the application encounters an unhandled exception, but then I saw that there is also a -t
switch, that --
-t - Write a dump when the process terminates.
automatically generates a dump when the process terminates.
Now the problem
I have tested the -t switch with our app by inserting a ExitProcess
or TerminateProcess
call at a defined location where I can trigger it.
While the app behaves as expected, i.e. TerminateProcess
immediately "kills" the running app and ExitProcess
takes a while because global cleanup is run, the dump generated this way is useless in both cases.
The dumps I get for -t
always contain only a sinlge thread (where the app was running over 20 thread at termination time) and the callstack isn't even at a useful location. (It just seems to be one random thread from the terminated app.)
Am I doing something wrong? Can I usefully use procdump -t
to track down unexpected calls of process exit functions at all?
I think not and here's why: test process calc.exe
I try to carefully suggest that procdump is waiting on calc.exe process handle.
In the crash dump file gets stack last complete process thread (TID 3136) just before the end of the process.
Crash dump file is created after the completion of the last thread, and before the end of the process.