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 client clone with headers deadlock #22410

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

VioletHynes
Copy link
Contributor

Fixes #22393

I pushed the locking out of the top level Headers method, and use headersInternal with the lock held, instead, inside top level client functions. The test, TestCloneWithHeadersNoDeadlock, consistently failed before the fix, and consistently passes.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 17, 2023
@VioletHynes VioletHynes marked this pull request as ready for review August 17, 2023 18:52
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@VioletHynes VioletHynes merged commit 8f1bf53 into main Aug 17, 2023
93 checks passed
@VioletHynes VioletHynes deleted the violethynes/fix-client-clone-deadlock-22393 branch August 17, 2023 19:13
@github-actions
Copy link

CI Results:
All Go tests succeeded! ✅

rebwill pushed a commit that referenced this pull request Aug 18, 2023
* Fix client clone with headers deadlock

* Changelog

* Typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api/client.go#clone() re-claims a non-re-entrant lock
2 participants