Message order error: sometimes clients get stuck
Closed this issue · 5 comments
lbarman commented
Relay:
1 : ( relay.(*PriFiLibRelayInstance).Received_ALL_ALL_PARAMETERS: 129) - Relay setup done, and setup sent to the trustees.
2 : ( relay.(*PriFiLibRelayInstance).Received_TRU_REL_TELL_PK: 420) - Relay : received TRU_REL_TELL_PK (1/1)
3 : ( prifi-lib.newMessageSenderWrapper.func2: 91) - Sent a *net.REL_CLI_TELL_TRUSTEES_PK.(client 0)
3 : ( prifi-lib.newMessageSenderWrapper.func2: 91) - Sent a *net.REL_CLI_TELL_TRUSTEES_PK.(client 1)
3 : ( prifi-lib.newMessageSenderWrapper.func2: 91) - Sent a *net.REL_CLI_TELL_TRUSTEES_PK.(client 2)
2 : (relay.(*PriFiLibRelayInstance).Received_CLI_REL_TELL_PK_AND_EPH_PK: 453) - Relay : received CLI_REL_TELL_PK_AND_EPH_PK (1/3)
2 : (relay.(*PriFiLibRelayInstance).Received_CLI_REL_TELL_PK_AND_EPH_PK: 453) - Relay : received CLI_REL_TELL_PK_AND_EPH_PK (2/3)
Client
3 : ( onet%2ev1.(*TreeNodeInstance).RegisterHandler: 249) - Registered handler PTID(net.REL_TRU_TELL_TRANSCRIPT:4a6ffce0dfa85338ac5a451b8d52537a) with flags 0
3 : ( onet%2ev1.(*TreeNodeInstance).RegisterHandler: 249) - Registered handler PTID(net.REL_TRU_TELL_RATE_CHANGE:e30d659f92805d3cb027b67569badce6) with flags 0
E : ( client.NewClient.func2: 110) - Required State INITIALIZING, but in state BEFORE_INIT
lbarman commented
Prevent message processing before initialization is done
lbarman commented
Not sure it is related to wrong order; maybe some messages were missed.
Steps to reproduce: make it2
until it fails (should never fail)
lbarman commented
This is a true Heisenbug. With dbg_lvl=5
, it does not happen.
lbarman commented
Should you encounter this bug, please keep the logs and send them to me. I am not able to reproduce it consistently.
lbarman commented
Fixed. Was because sometimes REL_CLI_TELL_TRUSTEES_PK
would be processed before ALL_ALL_PARAMETERS
. now the content of the first message is in the second one.