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

ModuleLoader: Avoid deadlock by retrying operation dispatch #393

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

radeksimko
Copy link
Member

This fixes a bug which is described in the inline comment. It seems quite unlikely end-user would hit it, but I did manage to hit it in CI test (TestModuleManager_ModuleCandidatesByPath) which panicked due to timeout (which I unfortunately do not have available as I retried it and it passed).

I also verified at least once that with sufficient pressure the codepath is hit:

$ go test ./internal/terraform/module -run=TestModuleManager_ModuleCandidatesByPath -count=750 -timeout=5s -p=1 -v | grep "no available capacity"
2021/02/03 15:29:59 module_loader.go:83: no available capacity, retrying dispatch

but I couldn't get a reliable repro unfortunately.

@radeksimko radeksimko added the bug Something isn't working label Feb 3, 2021
@radeksimko radeksimko requested a review from a team February 3, 2021 15:56
@radeksimko radeksimko force-pushed the b-retry-dispatch-on-no-capacity branch from 624de7f to cb4c187 Compare February 3, 2021 16:03
@radeksimko radeksimko merged commit 18e794b into main Feb 3, 2021
@radeksimko radeksimko deleted the b-retry-dispatch-on-no-capacity branch February 3, 2021 20:16
@ghost
Copy link

ghost commented Mar 5, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants