You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is caused by a problem in the pipe crate or by the non-deterministic nature of who reads/writes first from/to the bidirectional buffer when spawning the write and read threads in the test.
Sorry about this. I thought I could use pipe crate (a a synchronous memory pipe with buffered writer; https://docs.rs/pipe/0.4.0/pipe/) with our tests, but maybe it's not possible. Our implementation (specifically share_* functions
Closes#841
I had to clone the original crate to introduce 4 additional methods:
1. async_pipe
2. async_pipe_buffered
3. async_bipipe
4. async_bipipe_buffered
The difference is they all use unbounded `crossbeam` channel rather then
`bounded(0)` which makes them async.
And we need pipe to be async because of how the handshake is written
currently.
Closes#841
A copy of the `pipe` crate (https://github.com/arcnmx/pipe-rs) is added to the `tendermint-p2p` crate. I had to add a new method - `async_bipipe_buffered` to make the handshake tests always pass. `async_bipipe_buffered` method uses the `unbounded` channel (rather than the blocking one) for communication - hence the prefix. Note I also removed the methods and structures from `pipe` clone that we're not using at the moment.
I was running some tests today (on
master
) and found one of the P2P tests hanging indefinitely:tendermint-rs/p2p/src/secret_connection.rs
Line 539 in 4b0318c
Not sure if this is caused by a problem in the
pipe
crate or by the non-deterministic nature of who reads/writes first from/to the bidirectional buffer when spawning the write and read threads in the test.cc @melekes @xla
Steps to reproduce
It's not guaranteed to reproduce the issue, but if I run the following around 5-10 times the test usually hangs at least once:
What's the definition of "done" for this issue?
When we can reliably execute the test without it hanging.
The text was updated successfully, but these errors were encountered: