Skip to content
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

race condition in sequencer rotation #1135

Closed
mtsitrin opened this issue Oct 14, 2024 · 0 comments · Fixed by #1183 · May be fixed by #1154
Closed

race condition in sequencer rotation #1135

mtsitrin opened this issue Oct 14, 2024 · 0 comments · Fixed by #1183 · May be fixed by #1154
Assignees

Comments

@mtsitrin
Copy link
Contributor

When handling a rotation signal, there's a race condition between closing the errgroup and writing on the rotateC channel:

// we get here once a sequencer rotation signal is received
m.logger.Info("Sequencer rotation started.", "next_seq", nextSeqAddr)
go func() {
  rotateC <- nextSeqAddr
}()

And:

go func() {
  _ = eg.Wait()
  // Check if exited due to sequencer rotation signal
  select {
    case nextSeqAddr := <-rotateSequencerC:
	    m.handleRotationReq(ctx, nextSeqAddr)
    default:
	    m.logger.Info("Block manager err group finished.")
    }
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant