dotnet / diagnostics

This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
MIT License
1.18k stars 355 forks source link

Watson support for single-file apps #2438

Closed agocke closed 2 years ago

agocke commented 3 years ago

We should support automatically creating dumps from single-file apps, and automatically analyzing the dumps created from those crashes.

ghost commented 3 years ago

Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov See info in area-owners.md if you want to be subscribed.

Issue Details
We should support automatically creating dumps from single-file apps, and automatically analyzing the dumps created from those crashes.
Author: agocke
Assignees: -
Labels: `area-Single-File`, `untriaged`
Milestone: -
ghost commented 3 years ago

Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.

Issue Details
We should support automatically creating dumps from single-file apps, and automatically analyzing the dumps created from those crashes.
Author: agocke
Assignees: -
Labels: `area-Diagnostics-coreclr`
Milestone: -
hoyosjs commented 3 years ago

This should work with Windows Watson right now, provided that they configure collecting dumps on crash. Createdump on both platforms (and therefore environment variables) won't work as the binary won't be present.

tommcdon commented 3 years ago

I believe SOS work is completed for Windows single file dumps. Adding @mikem8361.

mikem8361 commented 3 years ago

We still have work in the CLRMD PE reader and runtime enumeration to look up exports because the current runtime enumeration is too slow for even regular non-single apps so it is enabled under an env var called DOTNET_ENABLE_SOS_SINGLEFILE=1

mikem8361 commented 3 years ago

But that is all out of band and in the clrmd/diagnostics repos.

hoyosjs commented 2 years ago

Other than ingestion from the Watson folks, and your PR, is there anything missing here @mikem8361?

mikem8361 commented 2 years ago

To be complete, there will be one more item to do (it is part of #2515:

Add Windows single-file support to the fallback runtime enumeration in platform/targetimpl.cpp. Need C++ to lookup PE exports.

I'm really not sure how important the C++ fallback is other than perf since we support using the desktop framework to host.

mikem8361 commented 2 years ago

The C++ runtime enumeration fallback code will work for Windows single-file because it uses GetOffsetBySymbol to find export.