Fix node startup failure when syncing on slow disk (v5.4)#4170
Merged
Fix node startup failure when syncing on slow disk (v5.4)#4170
Conversation
…to v1.11.1 Updates go-stoabs from v1.9.0 to v1.11.1, which removes an unnecessary Go-level read lock from the BBolt wrapper. The read lock caused reader starvation (context deadline exceeded) when a write transaction was pending, preventing network notifiers from starting on nodes with slow disk I/O (e.g. SMB/Azure Files volume mounts). Fixes #4162 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Coverage Impact ⬇️ Merging this pull request will decrease total coverage on 🛟 Help
|
stevenvegt
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Updates go-stoabs from v1.9.0 to v1.11.1, which removes an unnecessary Go-level read lock from the BBolt wrapper (go-stoabs#146).
Problem
Nodes with a large transaction log fail to start when disk I/O is slow (e.g. SMB/Azure Files volume mounts on Azure ACI):
On startup,
connectToKnownNodes()triggers many incoming transactions. Each write transaction holds a Go-level write lock while committing (including a slowfdatasyncover SMB). The go-stoabs wrapper used async.RWMutexwith writer-preference, which blocked all concurrent read transactions — including network notifiers trying to start. After 1 second, the notifiers time out and the node shuts down.Fix
go-stoabs v1.11.1 replaces the
sync.RWMutexwith a plainsync.Mutexthat only serializes write transactions. Read transactions now go directly to BBolt's native locking, which handles concurrent reads independently of writes. This eliminates the "unable to obtain BBolt read lock" error class entirely.See #4162 for the full root cause analysis and performance test results.
Fixes #4162
Test plan