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

Fix shutdown panic #980

Merged
merged 6 commits into from
Aug 12, 2024
Merged

Fix shutdown panic #980

merged 6 commits into from
Aug 12, 2024

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Jul 30, 2024

Resolve #976

  • Remove the Close method from the Manager. The unified way to stop Run is to have the passed context be done.
  • Do not hold the events channel or wait group as fields of a Manager. They are local objects scoped to the Run method, move them entirely to that scope.
  • Wait for all probes to close in Run before closing the chan they send on. This prevents a panic from the send on a closed chan.

@MrAlias MrAlias marked this pull request as ready for review July 31, 2024 15:49
@MrAlias MrAlias requested a review from a team July 31, 2024 15:49
@MrAlias MrAlias added this to the v0.15.0-alpha milestone Jul 31, 2024
@MrAlias MrAlias added the bug Something isn't working label Jul 31, 2024
internal/pkg/instrumentation/manager.go Show resolved Hide resolved
internal/pkg/instrumentation/manager_test.go Show resolved Hide resolved
instrumentation.go Show resolved Hide resolved
Copy link
Contributor

@edeNFed edeNFed left a comment

Choose a reason for hiding this comment

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

lgtm @MrAlias can we merge this?

@MrAlias MrAlias merged commit 5daba70 into open-telemetry:main Aug 12, 2024
19 checks passed
@MrAlias MrAlias deleted the fix-976 branch August 12, 2024 16:12
@MrAlias MrAlias mentioned this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic: send on closed channel
3 participants