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
As discussed in the Matrix channel, concurrent RPC calls seem to provoke an intermittent deadlock.
I am attaching scratch.zip, which contains a working example to reproduce this behavior. The example was built on commit e33fd9381f266af736f49ab7366c49f0397e3c16 of go-capnproto2 and version 0.9.1 of the capnp tool.
Summarizing a few key points from the Matrix discussion:
This bug also manifests using out-of-process transports, notably TCP to localhost.
The deadlock appears to occur when n>2 concurrent calls are made
This suggests a full buffer/channel somewhere
The synchronous semantics of net.Pipe likely cause this to happen sooner
@zenhack IFF you have the time, I would be super interested in pair-programming to debug this. This seems like a good opportunity to get more involved in the internals.
The text was updated successfully, but these errors were encountered:
This should fixcapnproto#189, though right now the tests are deadlocking and
I don't have the energy to debug, so I'm putting it down.
This also obviates MaxConcurrentCalls; in the current version of the
patch it is still present, but unused. Once this is working, a
subsequent commit will remove the Policy struct.
This significantly restructures the internals of *Server, and I
think the result is easier to understand: the methods on *Server
that start calls just stick the calls in a queue, and there is a
goroutine that pulls them out and handles them. This even gets rid
of Server.mu entirely, since nothing actually needed the lock
anymore!
Hopefully it will stay simple when I actually get it working.
This should fixcapnproto#189, though right now the tests are deadlocking and
I don't have the energy to debug, so I'm putting it down.
This also obviates MaxConcurrentCalls; in the current version of the
patch it is still present, but unused. Once this is working, a
subsequent commit will remove the Policy struct.
This significantly restructures the internals of *Server, and I
think the result is easier to understand: the methods on *Server
that start calls just stick the calls in a queue, and there is a
goroutine that pulls them out and handles them. This even gets rid
of Server.mu entirely, since nothing actually needed the lock
anymore!
Hopefully it will stay simple when I actually get it working.
As discussed in the Matrix channel, concurrent RPC calls seem to provoke an intermittent deadlock.
I am attaching scratch.zip, which contains a working example to reproduce this behavior. The example was built on commit
e33fd9381f266af736f49ab7366c49f0397e3c16
of go-capnproto2 and version 0.9.1 of the capnp tool.Summarizing a few key points from the Matrix discussion:
net.Pipe
likely cause this to happen sooner@zenhack IFF you have the time, I would be super interested in pair-programming to debug this. This seems like a good opportunity to get more involved in the internals.
The text was updated successfully, but these errors were encountered: