-
Notifications
You must be signed in to change notification settings - Fork 674
nil pointer dereference at fastdp.go:677 #1661
Comments
What circumstances trigger this? Presumably something relatively rare, since otherwise we would have seen it earlier. |
Is there also a problem in |
and I wonder whether |
So this isn't quite as silly as it might first appear. If we are sending a fastdp heartbeat to a peer, we must have fastdp, and they must have fastdp, so how can Answer: if we are attempting a connection to a 1.2 peer that we heard about from a 1.1 peer. So there's a direct fix here ( |
No and no. The |
Some more information on what happened. I have 5 nodes to upgrade from 1.1.0 to 1.2: On 3 of the other nodes, they came up and did not join a weave network (this is a problem on my side where the 3 nodes did not know about other weave nodes, different problem). On 4th node (this node panic), I did a weave reset, enable FastPath (enable by default), and it panics at the given stack trace. The 5th node, is still on 1.1.0... Not upgradeable. |
So a Or is there perhaps a better way to do this that doesn't break the |
The Forward contract explicitly describes the meaning of the nil value:
But
I'm not sure that would be better. And it's overkill given the context: When 1.1 compat is dropped, the nil case will go away. Furthermore, the router will only ever be exposed to
When But by all means add comments as you consider appropriate. |
Given that comment, I would have expected all
That is all much more obscure than introducing a special FlowOp and prohibiting |
The bug is fairly easy to reproduce in a way that confirms my theory:
The 1.2 peers then attempt to connect to each other, triggering the bug |
On second thoughts, that latter fix would be too much complexity for too little benefit. Once all 1.1 routers are gone, connections stuck using sleeve (if they occur) can be addressed simply by restarting the routers once more. |
See https://groups.google.com/a/weave.works/d/msg/weave-users/KBF7Ao_IT8Q/Nn1ZeLINCQAJ
In 1.2.0/1.2.1:
Cause:
fastDatapathForwarder Forward()
can return nil (as of 35141a4) but the invocation insendHeartbeat
wasn't updated to take account of that.The text was updated successfully, but these errors were encountered: