-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of the requirement to manually provision procdump.exe
#2972
Comments
This is valuable information, it's absolutely not clear from the docs. I shouldn't have messed with procdump since I also updated to 5.0. Yes I've already figured out the incantations to install Procdump, but unfortunately the process doesn't seem to be crashing when procdump is installed :( But I understand now that the issue as I filed it doesn't make much sense, because it's unclear whether dotnet test should bring procdump with it. Since the VSTest task already does that, then maybe the right workaround is just to switch to the VSTest task. |
Perhaps the Maybe that's how we should interpret this issue. Using |
The consensus everywhere is to not use procdump, but use the LocalDumps registry key instead:
|
I think local dumps would work for some scenarios. But what if you have multiple agents on the same system? We definitely don't want to automatically upload dump of testhost and other processes that crashed in a different agent. There are few pros and cons to localdumps and procdump: Procdump: ✔ control which process is dumped and where the dump is placed Local dumps: Imho the inverse of the above. ❌ hard to control which exact process is dumped Depending on the scenario that is investigated, those pros could be cons, and cons could be pros. When a process is crashing under testhost, and you have a single agent running on the whole system you would be happy to just enable "crash mode", which would collect all dumps, and a lot of stuff from event log. On the other hand when a build server is running multiple agents, you probably never want to enable all dumps from the system to be collected. I think the best option here is to continue using procdump, because crash diagnostics are usually enabled when needed, so the more narrow scope is more beneficial here. In reality there are just a few types of "crashes" that we've seen with testhost:
The only thing to note is that AVE from unmanaged code gets translated to Null Reference Exception in some cases, which makes it confusing when looking at the log that reports NRE while the dump reports AVE. .NET (Core) is also much better on spelling out when Stack Overflow happened. The exception shows the whole stack and you don't even need to run it with dumping.
The global flags silent exit reporting seem useful for confirming the crash is coming from within the process, but not hugely necessary.
In any case a coprehensive article to describe how to approach this would be nice. And I should write one. There are also some improvements that could be done: One improvement that should be done here is that -n 10 (or some other arbitrary number) should be used for the proc dump, because we are looking at first chance exceptions, and procdump only collects the first dump by default. When there is handled AVE in the code, we collect it as dump, but then never collect the actual crashing exception. Possibly an exit monitor could correlate the exit of process to the dump. Or delete the non-crashing dumps when it sees that the process did not crash after the exception. A mode for blame data collector, to set procdump to capture unhandled managed exceptions capturing instead of critical errors as we have it now. |
Enabling local dumps via --blame is a new feature and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform |
It is absolutely essential that the ability to collect dumps on test host process crashes can be turned on as simple as possible. It's a huge drain on productivity if every user who wants to do this has to go on a wild goose chase to figure out how to deploy it and add it to the path.
Let's find a way to ensure
procdump.exe
is included in the agent image, and just use that.The text was updated successfully, but these errors were encountered: