I know how to use AppVerif manually, along with windbg, to debug issues with a process, but I am putting together an automated system to run a series of stress tests without the presence of a user.
I need a way to just generate a process dump whenever AppVerif finds an issue, and continue on (assuming it is a non-fatal error).
Is there a way to configure AppVerif out right to just generate a dump of the process instead of breaking in, or do I have to attach windbg and somehow automate it to create a dump when a break is hit, and then continue on.
No, that's not a built-in feature for appverif.exe. Not a real problem, you can use another program to generate the minidump. Like SysInternals' ProcDump utility.
Run appverif.exe to configure your test app. You want to change the ExceptionOnStop property (bottom window). Set it TRUE so an exception is thrown when a test fails.
Then run your test with procdump, tell it to generate a dump on an unhandled exception with the -e
argument. For example:
c:\bin\procdump -e -x . broken.exe
Looks like this when I tried it on broken.exe, it intentionally mangles a handle:
ProcDump v7.1 - Writes process dump files
Copyright (C) 2009-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
With contributions from Andrew Richards
Process: broken.exe (5892)
CPU threshold: n/a
Performance counter: n/a
Commit threshold: n/a
Threshold seconds: 10
Hung window check: Disabled
Log debug strings: Disabled
Exception monitor: Unhandled
Exception filter: *
Terminate monitor: Disabled
Cloning type: Disabled
Concurrent limit: n/a
Avoid outage: n/a
Number of dumps: 1
Dump folder: .\
Dump filename/mask: PROCESSNAME_YYMMDD_HHMMSS
Press Ctrl-C to end monitoring without terminating the process.
[11:23:30] Exception: C0000008.INVALID_HANDLE
[11:23:30] Exception: C0000421
[11:23:30] Unhandled: C0000421
[11:23:30] Dump 1 initiated: .\broken.exe_150713_112330.dmp
[11:23:30] Dump 1 complete: 1 MB written in 0.0 seconds
[11:23:31] Dump count reached.
You'll probably want to change the location where the dump file is written and add some automation so there is a notification when a dump is produced.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With