Skip to content

Non-deterministic deadlock on concurrent RPC calls #189

@lthibault

Description

@lthibault

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:

  1. This bug also manifests using out-of-process transports, notably TCP to localhost.
  2. 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions