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
Environment.FailFast not capturing message and exception details to Windows Event Log #8959
Comments
@jkotas I have briefly looked into it and it seems we have logging into event log disabled for CoreCLR. See the |
This was done for Windows Phone for some reason. I do not see a reason why it cannot be re-enabled for .NET Core. Note that there are likely more changes required than just deleting this ifdef to make it work well. E.g. the |
Related problem, Environment.FailFast(System.String, System.Exception) is logging the message, but not the details of the exception. This is making it impossible to diagnose the cause of my frequent restarts within IIS. |
@sywhang were you planning to do this one also? It seems this would be very useful to some folks. |
This sholud be fixed in 2.1 |
Should be fixed with dotnet/coreclr#16875. |
@sywhang Is there any way we could get this fix ported to older versions? If it's in 2.1 and up we have to increase our min version for our app (which we are unable to do as we have to target RS1+) |
@Tadimsky what version of coreclr are you using? |
.NET Core 2.1 is expected to work on RS1+ fine. |
I think I may be confusing things then. It looks like that UWP depends on CoreCLR >1.0.3? Is that correct? |
Right. .NET Native UWP is build from some of the same parts as .NET Core, but it is a different product with different versions, etc. |
@jkotas So if we are experiencing this issue with |
You should be getting data about your app crashes via https://docs.microsoft.com/en-us/windows/uwp/monetize/get-error-reporting-data . The Microsoft internal name for this is Watson. |
We're an internal app and use Watson. The data available in !analyze in WinDBG does not contain the information provided to FailFast due to this issue. |
I doubt that it is because of this issue. The logging added here goes to https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-reporteventw . This API is not allowed in UWP apps. |
Runtime Environment
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861
Repro
On .NET Framework 4.6.1 the runtime creates the following event in the Application event log with the following details:
FailFast
(eg. "Something bad happened")On .NET Core 2.0 no such event is logged. The only event is the generic windows Application Error (1000 event) which does not contain the stack trace or message passed to
FailFast
.Has this been done for cross-platform reasons, ie. Unix has no Windows Event Log?
The event that gets logged on
net461
is very useful and it would be good to have the same level of information onnetcoreapp20
.The text was updated successfully, but these errors were encountered: