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

[SDK] Fix deadlock when shuting down http client #2337

Merged

Conversation

owent
Copy link
Member

@owent owent commented Sep 27, 2023

Fixes #2336

Changes

  • Reduce critical section of session_ids_m_ in http client.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@owent owent requested a review from a team September 27, 2023 10:33
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #2337 (ca8908a) into main (a45081a) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2337      +/-   ##
==========================================
+ Coverage   87.43%   87.45%   +0.02%     
==========================================
  Files         199      199              
  Lines        5997     5997              
==========================================
+ Hits         5243     5244       +1     
+ Misses        754      753       -1     

see 1 file with indirect coverage changes

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

The change itself looks good, and reduces the amount of code executed under a lock, so approved.

Unsure if:

  • we know for sure that the root cause of the deadlock found was related to the critical sections involved in this patch, so the root cause is fixed
  • we do not know the exact root cause of the deadlock found, so this fix will improve things in general but a deadlock may still exist.

Please clarify.

@marcalff marcalff merged commit 368ee79 into open-telemetry:main Sep 28, 2023
44 checks passed
@owent owent deleted the fix_http_client_deadlock_when_shutdown branch September 28, 2023 08:11
@marcalff marcalff changed the title Fix deadlock when shuting down http client. [SDK] Fix deadlock when shuting down http client. Oct 11, 2023
@marcalff marcalff changed the title [SDK] Fix deadlock when shuting down http client. [SDK] Fix deadlock when shuting down http client Oct 11, 2023
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.

There may be deadlock when shutdown using http client.
3 participants