Skip to content
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

[EventPipe] Handle EventPipe Enable calls during shutdown #105842

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

mdh1418
Copy link
Member

@mdh1418 mdh1418 commented Aug 1, 2024

Fixes #103480

@mdh1418
Copy link
Member Author

mdh1418 commented Aug 1, 2024

I'm wondering, would there be another way to detect shutdown and avoid attempting to enable the eventpipe session?
Would it be possible to detect whether or not shutdown is in progress and then deem it unnecessary to call disable events in CallDisableEventsIfNecessary?

Would guarding EventPipeAdapter::StartStreaming and CommitDispatchConfiguration code paths from a failed session enable silently some paths where we would want to bubble up that the eventpipe session failed to enable?

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

There is still some remaining fishy behavior shown in #103480 that would be good to address in other PRs.

  • The crash that occurs when the EventListener is not disposed
  • We called EventListener.DisableEvents() but somehow that is being translated into a call to EventPipeInternal.Enable().

Copy link
Member

@davmason davmason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdh1418 mdh1418 merged commit 50d6cad into dotnet:main Aug 6, 2024
145 of 149 checks passed
@mdh1418 mdh1418 deleted the fix_event_listener_dispose branch August 6, 2024 17:26
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when disposing an EventListener during shutdown
4 participants