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

[9.0](backport #6927) Fix deadlock in error handling in OTelManager #6956

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 20, 2025

What does this PR do?

Fixes an issue where a deadlock would cause the the OTelManager to get stuck.

This also seems to be the cause of the flaky test TestOTelManager_Run. I have ran this over 100 times and hit no more errors with this PR.

Why is it important?

Deadlock causes the running internal OTel collector from getting any more updates or actions.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Disruptive User Impact

None

How to test this PR locally

go test -race -v -count=100 github.com/elastic/elastic-agent/internal/pkg/otel/manager

Related issues


This is an automatic backport of pull request #6927 done by [Mergify](https://mergify.com).

* Fix race in error handling.

* Add changelog.

* Add testing.

* Changelog bug-fix.

(cherry picked from commit 9b572ef)
@mergify mergify bot requested a review from a team as a code owner February 20, 2025 18:32
@mergify mergify bot added the backport label Feb 20, 2025
@mergify mergify bot requested review from kaanyalti and andrzej-stencel and removed request for a team February 20, 2025 18:32
@github-actions github-actions bot added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Feb 20, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@blakerouse blakerouse enabled auto-merge (squash) February 20, 2025 20:43
@blakerouse blakerouse merged commit d7b70d7 into 9.0 Feb 21, 2025
16 checks passed
@blakerouse blakerouse deleted the mergify/bp/9.0/pr-6927 branch February 21, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants