You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When EventSourceSupport MSBuild property is set to true, the build currently errors out. It is possible to bypass this by setting _SuppressNativeLibEventSourceError property to true but there are known issues. It is not recommended to ship native libraries like this unless one can make sure no other native library (or a CoreCLR instance) with EventSourceSupport gets loaded into the process. Users might consider shipping two versions of their native library DLL and only use the one with EventSourceSupport enabled when troubleshooting a specific issue.
This is a tracking uber issue that groups the known existing problems:
Our guidance for EventSource/EventPipe with native AOT shared libraries is as follows,
Only use the EventSourceSupport enabled when troubleshooting a specific issue related to shared libraries.
Any native AOT console with EventSourceSupport enabled will always win even if the process has other native AOT shared libraries with EventSourceSupport enabled.
If there are multiple native AOT shared libraries present in a single process, then the first shared library that gets loaded will win to emit traces. Traces from other libraries will not be seen.
[Windows] When collecting tracing in a shared library, collection should stop earlier in the application (only collect for a specific time period or use the ctrl-C option with a tool like dotnet-trace when the interesting traces are collected). Specifically, in windows, the image unload event for a shared library (or at process exit), will not make a call to shut down the EventPipe in an orderly manner, causing a corrupted trace file.
Given these challenges, it's probably best to keep the current warnings we have for shared library around EventSource support.
The text was updated successfully, but these errors were encountered:
When EventSourceSupport MSBuild property is set to true, the build currently errors out. It is possible to bypass this by setting _SuppressNativeLibEventSourceError property to true but there are known issues. It is not recommended to ship native libraries like this unless one can make sure no other native library (or a CoreCLR instance) with EventSourceSupport gets loaded into the process. Users might consider shipping two versions of their native library DLL and only use the one with EventSourceSupport enabled when troubleshooting a specific issue.
This is a tracking uber issue that groups the known existing problems:
Trying to enable EventSourceSupport in a shared library project on Native AOT currently results in a build failure since this is actively blocked in the targets. But EventSourceSupport/event pipe mostly work, with some issues (#91762).
The blocking makes it impossible for anyone to run diagnostics on their shared library. This is a regression from .NET 7, where it was at least possible to get GC ETW events in PerfView on Windows.
This changes the blocking to a suppressible warning, and fixes and issue that was causing a shutdown hang.
When
EventSourceSupport
MSBuild property is set to true, the build currently errors out. It is possible to bypass this by setting_SuppressNativeLibEventSourceError
property to true but there are known issues. It is not recommended to ship native libraries like this unless one can make sure no other native library (or a CoreCLR instance) with EventSourceSupport gets loaded into the process. Users might consider shipping two versions of their native library DLL and only use the one with EventSourceSupport enabled when troubleshooting a specific issue.This is a tracking uber issue that groups the known existing problems:
Our guidance for
EventSource/EventPipe
with native AOT shared libraries is as follows,EventSourceSupport
enabled when troubleshooting a specific issue related to shared libraries.EventSourceSupport
enabled will always win even if the process has other native AOT shared libraries withEventSourceSupport
enabled.win
to emit traces. Traces from other libraries will not be seen.EventPipe
in an orderly manner, causing a corrupted trace file.Given these challenges, it's probably best to keep the current warnings we have for shared library around
EventSource
support.The text was updated successfully, but these errors were encountered: