-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Don't shut down event pipe in DLLs on Windows #91715
Conversation
This reverts commit e811599.
Works around dotnet#89346.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsWorks around #89346. We blocked event pipe completely in shared libraries in #90811 but:
I validated the shared library scenario no longer hangs at shutdown with this. #89346 still tracks if we can do better here. Cc @dotnet/ilc-contrib
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks!
Does it actually work though? Can you load two libraries into the same process, enable event support, and the use dotnet-monitor or similar to retrieve events from both libraries? I'd rather disable this completely until we're confident the scenario is working as we want it to. |
What about allowing a bypass? So blocked by default because of the multiple runtime questions, but still let people explicitly enable it as a 'I understand the limitations - I will only have one library/runtime and I want to be able to trace it'. I think that was actually @MichalStrehovsky's original suggestion. |
Yup, bypass sounds great, just like we did with WPF. |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Show resolved
Hide resolved
…e.Publish.targets Co-authored-by: Elinor Fung <elfung@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I had in mind if we really insist on blocking this.
This is different from the WPF block because that one doesn't work at all. This works, for a large majority of users.
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Outdated
Show resolved
Hide resolved
That's what I was asking, though. Does it? Loading two CoreCLR instances in the same process is unsupported. Loading two Native AOT binaries in the same process is fully supported. If this is fully supported, I would expect it to be fully supported across all our supported configurations. |
Yes, but so is EventSourceSupport in Native AOT exe files, and CoreCLR hosting APIs. Still if you use all of these in a single process, it will likely hit the same issue as two NativeAOT dlls. I think the right course of action is not in blocking (because we can't block that one), but in defining a failure mode. |
@agcoke the last commit downgrades the error to a suppressible warning with a link to the issue. I considered making a fwlink for it but maybe that's an overkill. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor wording change suggested, and replaced link with a link to our official docs. I figure we can add a line in here to fully explain the situation.
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Outdated
Show resolved
Hide resolved
…e.Publish.targets Co-authored-by: Andy Gocke <andy@commentout.net>
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets
Outdated
Show resolved
Hide resolved
…e.Publish.targets
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6181325936 |
Works around #89346.
We blocked event pipe completely in shared libraries in #90811 but:
I validated the shared library scenario no longer hangs at shutdown with this.
#89346 still tracks if we can do better here.
Cc @dotnet/ilc-contrib