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

Add null check to StrictContextStorage #5954

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

@laurit laurit requested a review from a team November 1, 2023 18:22
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...io/opentelemetry/context/StrictContextStorage.java 81.65% <50.00%> (-0.76%) ⬇️

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@jkwatson
Copy link
Contributor

jkwatson commented Nov 1, 2023

Can you provide a unit test for this change?

@laurit
Copy link
Contributor Author

laurit commented Nov 1, 2023

@jkwatson I believe that this only happens on openj9. To create a test that reproduces we would first need to run the tests with openj9. Secondly looking at https://github.com/eclipse-openj9/openj9/blob/78038a17db84716d97cb57e1b76bec7975a00bf7/jcl/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java#L139-L162 I'd guess for it to return null there would have to be a spurious wakeup from wait or perhaps multiple threads calling remove. I doubt that it is possible to write an unit test that would reliably reproduce this with a single run.

@trask
Copy link
Member

trask commented Nov 1, 2023

maybe worth adding ^^ as a code comment?

@jack-berg jack-berg added this to the 1.32.0 milestone Nov 3, 2023
@jack-berg jack-berg merged commit 1ecc919 into open-telemetry:main Nov 6, 2023
17 of 18 checks passed
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.

4 participants