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

IPC on windows hangs after first connection #490

Closed
onsails opened this issue Sep 28, 2019 · 2 comments
Closed

IPC on windows hangs after first connection #490

onsails opened this issue Sep 28, 2019 · 2 comments

Comments

@onsails
Copy link
Contributor

onsails commented Sep 28, 2019

I am running simple IPC server presented in jsonrpc examples on windows.
After sending request from the first connection and immediate pipe closing the second connection can't be established.
I've run IPC monitor in IO Ninja and see the following log:

PID #9272 file #10: Server file opened: \Pipe.Server
PID #5976 file #11: Client file opened: \Pipe.Server
<stripped data>
File closed
PID #5976: Cannot open client file \Pipe.Server: All pipe instances are busy. 

I've run server with Trace log level and don't see any logs on a connection attempt. Just starting logs:

starting server2019-09-29 00:43:22,688 TRACE [mio::poll] registering with poller
2019-09-29 00:43:22,688 TRACE [mio::poll] registering with poller
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::builder] build; num-workers=2
2019-09-29 00:43:22,704 TRACE [mio::poll] registering with poller
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::sender] execute; count=1
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::sender] execute; count=2
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool]     -> submit external
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool]     -> submit external
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- notify; idx=1
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- notify; idx=0
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- spawn; idx=1
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- spawn; idx=0
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] shutdown; state=pool::State { lifecycle: Running, num_futures: 2 }
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool]   -> transitioned to shutdown
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker] Worker::sleep; worker=WorkerId(1)
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker] Worker::sleep; worker=WorkerId(0)
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker]   sleeping -- push to stack; idx=1
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker]   sleeping -- push to stack; idx=0
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker]     -> starting to sleep; idx=1
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::worker]     -> starting to sleep; idx=0
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,704 TRACE [tokio_reactor] loop process - 0 events, 0.000s
2019-09-29 00:43:22,704 TRACE [tokio_reactor] loop process - 0 events, 0.000s
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- notify; idx=0
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::pool] signal_work -- notify; idx=1
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] select; timeout=None
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::task] Task::run; state=Running
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,704 TRACE [tokio_threadpool::task]     -> not ready
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,704 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,720 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,704 TRACE [tokio_reactor] event Readable Token(4194303)
2019-09-29 00:43:22,720 TRACE [tokio_reactor] loop process - 1 events, 0.010s
2019-09-29 00:43:22,720 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,720 TRACE [tokio_threadpool::worker]     -> wakeup; idx=1
2019-09-29 00:43:22,720 TRACE [tokio_reactor] event Readable Token(4194303)
2019-09-29 00:43:22,720 TRACE [tokio_threadpool::task] Task::run; state=Running
2019-09-29 00:43:22,720 TRACE [tokio_reactor] loop process - 1 events, 0.000s
2019-09-29 00:43:22,720 TRACE [parity_tokio_ipc] Incoming connection was to block, waiting for connection to become writeable
2019-09-29 00:43:22,720 TRACE [tokio_threadpool::worker] Worker::sleep; worker=WorkerId(0)
2019-09-29 00:43:22,720 DEBUG [tokio_reactor] adding I/O source: 0
2019-09-29 00:43:22,720 TRACE [tokio_threadpool::worker]   sleeping -- push to stack; idx=0
2019-09-29 00:43:22,720 TRACE [mio::poll] registering with poller
2019-09-29 00:43:22,720 TRACE [tokio_threadpool::worker]     -> starting to sleep; idx=0
2019-09-29 00:43:22,720 TRACE [mio::poll] registering with poller
2019-09-29 00:43:22,720 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,720 DEBUG [tokio_reactor::registration] scheduling Write for: 0
2019-09-29 00:43:22,735 TRACE [tokio_threadpool::task]     -> not ready
2019-09-29 00:43:22,720 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,735 TRACE [tokio_reactor] loop process - 0 events, 0.000s
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] select; timeout=None
2019-09-29 00:43:22,735 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,735 TRACE [tokio_reactor] loop process - 0 events, 0.000s
2019-09-29 00:43:22,751 TRACE [tokio_threadpool::worker] Worker::sleep; worker=WorkerId(1)
2019-09-29 00:43:22,751 TRACE [tokio_threadpool::worker]   sleeping -- push to stack; idx=1
2019-09-29 00:43:22,751 TRACE [tokio_threadpool::worker]     -> starting to sleep; idx=1
2019-09-29 00:43:22,751 TRACE [mio::sys::windows::selector] select; timeout=Some(0ns)
2019-09-29 00:43:22,766 TRACE [mio::sys::windows::selector] polling IOCP
2019-09-29 00:43:22,766 TRACE [mio::sys::windows::selector] returning
2019-09-29 00:43:22,766 TRACE [tokio_reactor] loop process - 0 events, 0.000s
2019-09-29 00:43:22,766 TRACE [mio::sys::windows::selector] select; timeout=None
2019-09-29 00:43:22,766 TRACE [mio::sys::windows::selector] polling IOCP
@onsails
Copy link
Contributor Author

onsails commented Sep 28, 2019

I suppose this issue is related to the problem.

@onsails
Copy link
Contributor Author

onsails commented Oct 3, 2019

fixed in 77d7fb6

@onsails onsails closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant