Skip to content

fix(client): bump lockgate to v0.2.1 to avoid deadlock at lock timeout boundary - #434

Merged
alexey-igrychev merged 3 commits into
mainfrom
fix/client-lockgate-deadlock
Oct 22, 2026
Merged

alexey-igrychev merged 3 commits into
mainfrom
fix/client-lockgate-deadlock

Conversation

@alexey-igrychev

Copy link
Copy Markdown
Member

trdl use / trdl add could crash with fatal error: all goroutines are asleep - deadlock! when the configuration file lock was acquired in the same instant its 30s timeout expired. Seen on shared GitLab shell runners where several trdl processes contend for ~/.trdl while one of them holds the exclusive lock during a slow network call.

Root cause and fix are in lockgate: werf/lockgate#49 (released as v0.2.1). This PR only bumps the dependency (gofrs/flock moves to v0.13.0 transitively).

Checks: go build ./... && go vet ./pkg/... && go test ./... in client/ — green.

…t boundary

lockgate pollLock could crash the process with "all goroutines are asleep -
deadlock!" when the file lock was acquired in the same instant the lock
timeout expired. Observed on shared GitLab runners where several trdl
processes contend for the configuration lock.

Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
@alexey-igrychev
alexey-igrychev merged commit 6c5ed32 into main Oct 22, 2026
20 of 25 checks passed
@alexey-igrychev
alexey-igrychev deleted the fix/client-lockgate-deadlock branch October 22, 2026 15:41
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.

1 participant