Skip to content

fix: race condition#55

Open
colinkim wants to merge 10 commits intodevfrom
fix/race-condition
Open

fix: race condition#55
colinkim wants to merge 10 commits intodevfrom
fix/race-condition

Conversation

@colinkim
Copy link
Contributor

@colinkim colinkim commented Feb 11, 2026

refactor: fix data races in consensus core and timer management

  • Add timerMu (sync.Mutex) to synchronize timer stop/set operations.
  • Implement snapshotting for current Sequence and Round in timers to prevent races during view changes.
  • Ensure thread-safety for futurePreprepareTimer in handlePreprepareMsg.
  • Prevent potential deadlocks and nil pointer dereferences in callback routines.

These changes improve the stability of the consensus engine.

Close #41

@colinkim colinkim requested review from 0xmhha, code0xff, egonspace, eomti-wm and hominlee-wemade and removed request for hominlee-wemade February 11, 2026 01:43
@egonspace egonspace changed the title Fix/race condition fix: race condition Feb 11, 2026
@egonspace egonspace added the enhancement New feature or request label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Data Races detected in consensus/wbft with -race flag

3 participants