-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
We identified a few places in which goroutines might block without listening for context cancellations:
- slotticker.go: we don't check for cancellations when waiting for the timer (). At most, this should block for the slot time though.
<-timer.C - channel.go: There's a function that forwards from one channel to the other. We block when the outgoing channel is full without checking for cancellations (). So far, all channels we pass seem to be unbounded, but still something we should fix just to be sure.
send <- val - eonkeypublisher.go: blocks without checking for cancellations (), but channel has size 32 which we shouldn't have hit yet.
p.keys <- key - retry.go: haven't fully understood the code yet and I'm unsure if it's critical or not, but it does seem like we should check for cancellations here. At the very least, we might block here for the max retry interval of 60s ():
iter <- <-r.clock.After(nextTick)
At some places in which we send something to a channel, it seems we might block, but since the involved channels are unbounded it should not cause any issues (still cleaner to fix in my opinion):
channelNew...functions in gnosis and service keyper.go (e.g.,)kpr.newBlocks <- ev newslot.go: kpr.decryptionTriggerChannel ()kpr.decryptionTriggerChannel <- event
Some parts of unused codes are also susceptible:
| chann <- notification |
| func StartNewBroker[T any](nonBlocking bool) *Broker[T] { |
Metadata
Metadata
Assignees
Labels
No labels