weaveworks/mesh

surrogateGossiper can form a feedback loop

bboreham opened this issue · 0 comments

If we have at least 3 peers which do not implement a particular channel, and some other peer sends gossip on that channel, then the following happens:

  1. Router.handleGossip() decodes the message and calls gossipChannel.deliver()
  2. gossipChannel.deliver() calls surrogateGossiper.OnGossip() with the incoming message
  3. surrogateGossiper.OnGossip returns a surrogateGossipData with the same payload
  4. gossipChannel.deliver() then relays this payload to other listeners
  5. repeat

This surfaced as an error message from Weave Net "connection shutting down due to error: host clock skew of -4043s exceeds 900s limit", reported at https://groups.google.com/a/weave.works/forum/#!topic/weave-users/zcrATGRTY6s

It is quite bad because the peers are sending gossip data in a tight loop.