-
Notifications
You must be signed in to change notification settings - Fork 379
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
Log client: WaitForRootUpdate "stuck" with concurrent calls to AddLeaf #3294
Comments
I haven't looked into details but this looks similar to #3236 at a glance. |
I could be wrong, but I think this is a different issue. There is no deadlock here. As shown in the test, the trusted root is updated by one goroutine while the others sleep in But callers of |
If
LogClient.AddLeaf
is called concurrently (and thus multiple leaves are queued, and then processed together in a single pass of the operation manager), when theLogClient.root
is updated, only one of the concurrent calls toWaitForRootUpdate
successfully return.When the other goroutines reach
LogClient.UpdateRoot
the new trusted root of the client is already updated, therefore they keep waiting inWaitForRootUpdate
until either a new leaf is added, or the context expires/is canceled.This commit reproduces the behavior in a unit test: gpdionisio@8acb052
This commit is a proposed fix: gpdionisio@d0f7ad2
The text was updated successfully, but these errors were encountered: