-
Notifications
You must be signed in to change notification settings - Fork 87
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
Validate connection manager/inbound governor transition order #3360
Merged
bolt12
merged 6 commits into
p2p-master
from
bolt12/p2p-master-validate-transition-order
Nov 2, 2021
Merged
Validate connection manager/inbound governor transition order #3360
bolt12
merged 6 commits into
p2p-master
from
bolt12/p2p-master-validate-transition-order
Nov 2, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was
linked to
issues
Sep 20, 2021
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
September 23, 2021 15:06
b68bb6d
to
ef2d1fd
Compare
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
October 1, 2021 11:30
34c7cdc
to
de9a060
Compare
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
3 times, most recently
from
October 4, 2021 10:24
47c06ba
to
1add932
Compare
coot
reviewed
Oct 4, 2021
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
2 times, most recently
from
October 6, 2021 08:19
d8c306a
to
15dd65b
Compare
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
7 times, most recently
from
October 8, 2021 12:02
5be3bbc
to
4d0cca7
Compare
Merged
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
4 times, most recently
from
October 12, 2021 13:05
48b2528
to
03d9534
Compare
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
October 21, 2021 11:54
634ead5
to
fb4eb98
Compare
coot
reviewed
Oct 22, 2021
ouroboros-network-framework/src/Ouroboros/Network/InboundGovernor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
2 times, most recently
from
October 25, 2021 10:27
41d299f
to
21b9799
Compare
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
October 26, 2021 07:39
21b9799
to
29dcdfe
Compare
coot
reviewed
Oct 26, 2021
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
coot
reviewed
Oct 26, 2021
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
coot
requested changes
Oct 26, 2021
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
ouroboros-network-framework/test/Test/Ouroboros/Network/Server2.hs
Outdated
Show resolved
Hide resolved
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
October 27, 2021 13:53
29dcdfe
to
26ad1f6
Compare
coot
reviewed
Oct 29, 2021
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
3 times, most recently
from
October 29, 2021 12:18
6ecf01c
to
e6c69cc
Compare
coot
approved these changes
Nov 2, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I left a minor comment (bang in modifyTMVarSTM
), but this can be left for later as well (in that case create a github issue for it).
ouroboros-network-framework/src/Ouroboros/Network/ConnectionManager/Core.hs
Outdated
Show resolved
Hide resolved
- In unregisterInboundConnectionImpl: OutboundDupState Ticking -> OutboundDupState Expired - In withConnectionManager cleanup, where we put the state in TerminatedState is missing a trace. However, since this can be async the connState can come out of order and/or not making much sense. - In requestOutboundConnectionImpl bracketOnError: TerminatedState -> Unknown - In includeInboundConnectionImpl: on readPromise Left handleError case, where we put the state in either TerminatingState or TerminatedState - In unregisterInboundConnectionImpl: Only trace TerminatingState -> TerminatedState, after having written to the connVar - In a possible race between withConnectionManager finally block and forkConnectionHandler cleanup function, where the latter can run first and break an assumption made by withConnectionManager that it is the first to run so a connection shouldn't be in TerminatingState (which is not the case, since there is a race condition). So an out of order and possibly not making much sense transition is logged. - When accept call returns first than connect and the connVar gets overwritten. In requestOutboundConnectionImpl cleanup function we wrongly trace * -> TerminatedState transition of a removed connVar, we shouldn't care about that connVar anymore. - In promotedToWarmRemoteImpl, in OutboundIdleState case we are not updating the state correctly.
In promotedToWarmRemoteImpl (and family), it is possible that the STM action successfully commits, writing a new state to the connVar, but right after an AsyncCancelled is received making us omit the respective transition tracing.
Fixed issue in inboundGovernor function where in case of Async exceptions we wouldn't log the final transitions for the connections.
- This way an assertion is not a pure exception evaluated when printing an `io-sim` test case, but a simulation error. Note that this will hide such exceptions from simulation. To test that such assertion do not happen we can analyse trace. - Check that `TrUnexpectedlyMissingConnectionState` is not logged. This is an initial part of #3465. Authors: Marcin Szamotulski
Basically, if I connect to someone and someone connects to me, before the connect returns (and before the remote accept returns as well) the local accept can return first masking itself as the remote one because we have no way to distinguish directions.
bolt12
force-pushed
the
bolt12/p2p-master-validate-transition-order
branch
from
November 2, 2021 14:49
e6c69cc
to
94c4b30
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.