You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to mean that if we create a newBlockSeriesClient but not call close, the blocks' pendingReaders wg will never be decremented causing the deadlock.
What happened:
Seems that since this change we can have a dead lock when syncing blocks on store gateway.
During the sync process we may try to remove block and in order to do it safely we wait all the reads on that block to finish. See:
thanos/pkg/store/bucket.go
Line 734 in 48e2806
thanos/pkg/store/bucket.go
Lines 2023 to 2026 in 48e2806
The
pendingReaders
wg is incremented when we create a new bucket client here:thanos/pkg/store/bucket.go
Lines 873 to 882 in 48e2806
thanos/pkg/store/bucket.go
Lines 1995 to 1998 in 48e2806
And decremented on the close method:
thanos/pkg/store/bucket.go
Lines 897 to 903 in 48e2806
thanos/pkg/store/bucket.go
Lines 2641 to 2644 in 48e2806
This seems to mean that if we create a
newBlockSeriesClient
but not call close, the blocks'pendingReaders
wg will never be decremented causing the deadlock.This seems to be the case at least in 2 places:
thanos/pkg/store/bucket.go
Line 1484 in 48e2806
and
thanos/pkg/store/bucket.go
Line 1658 in 48e2806
What you expected to happen:
pendingReaders
wg should be decremented after the read is done.How to reproduce it (as minimally and precisely as possible):
Call GetLabels on a block and wait it to be removed from store gateway.
Full logs to relevant components:
Go routine that shows the deadlock:
The text was updated successfully, but these errors were encountered: