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 oltp exporter shutdown race condition #4490

Closed

Conversation

jomcgi
Copy link
Contributor

@jomcgi jomcgi commented Mar 17, 2025

Description

Exports can start after the lock is acquired but before the shutdown flag is set, this raises an error if the channel has already been closed.
Avoid this race condition by setting the shutdown flag before acquiring the lock.

Fixes #4465

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox -e py313-test-opentelemetry-exporter-otlp-proto-grpc

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Exports can start after the lock is acquired but before the shutdown flag is set, this raises an error if the channel has already been closed.
Avoid this race condition by setting the shutdown flag before acquiring the lock.
@jomcgi jomcgi force-pushed the bug-4465/py13-oltp-exporter-error branch from d63bc56 to ee7e730 Compare March 17, 2025 21:22
@jomcgi jomcgi changed the title [WIP] Fix oltp exporter shutdown race condition Fix oltp exporter shutdown race condition Mar 20, 2025
@jomcgi jomcgi marked this pull request as ready for review March 20, 2025 21:11
@jomcgi jomcgi requested a review from a team as a code owner March 20, 2025 21:11
@jomcgi
Copy link
Contributor Author

jomcgi commented Mar 28, 2025

Closing as this will be resolved by #4511

@jomcgi jomcgi closed this Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate otlp exporter test failure with python 3.13
2 participants