Skip to content
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

Testing sometimes hangs #36

Closed
sergefdrv opened this issue Apr 28, 2022 · 3 comments · Fixed by #38
Closed

Testing sometimes hangs #36

sergefdrv opened this issue Apr 28, 2022 · 3 comments · Fixed by #38
Labels
bug Something isn't working

Comments

@sergefdrv
Copy link
Contributor

Sometimes make test hangs, e.g. here.

@sergefdrv sergefdrv added the bug Something isn't working label Apr 28, 2022
@sergefdrv
Copy link
Contributor Author

sergefdrv commented Apr 28, 2022

I managed to reproduce it with (normally it takes around 30s for testing on my machine):

while GOFLAGS="-timeout=1m -count=1" make test; do :; done

@matejpavlovic
Copy link
Contributor

Hm looks like there is some non-deterministic issue when shutting down the gRPC transport after the actual test finishes. I saw it before and I thought I had fixed it, but apparently I didn't.

@matejpavlovic
Copy link
Contributor

I think I got it.
The transport layer is writing messages that it receives over the network to a channel, from which the node implementation reads them. When the node is shutting down, it stops reading incoming messages from this channel. However, if there are still incoming messages on the wire at that time, the transport layer tries to write them to the channel and blocks (since nobody reads any more), preventing a clean shutdown of the transport layer. Should not be hard to fix using a Context for the transport layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants