`Connection` leak when a ProxyClient `construct()` fails preventing `EventLoop::loop()` from exiting #309

issue xyzconstant opened this issue on July 14, 2026
  1. xyzconstant commented at 4:28 PM on July 14, 2026: contributor

    When a capnp init interface declares a construct() method (as observed in example/init.capnp and Bitcoin Core's Init interface), the generated ProxyClient constructor invokes it automatically, resulting in a blocking IPC call during the construction of the client within ConnectStream.

    If that call fails, such as when connecting to a disconnected socket, the exception escapes ProxyClientBase's constructor. Normally, cleanup occurs in the destructor but if the constructor throws no object is created, and the destructor doesn't run. As a result, cleanup functions are not called, the Connection object is leaked, and its EventLoopRef prevents EventLoop::loop() from exiting.

    Any thread that joins the event loop thread then hangs forever. In #298 this made the disconnected-socket test hang the whole suite instead of failing.

  2. xyzconstant renamed this:
    `Connection` leak when a ProxyClient `construct()` fails, preventing `EventLoop::loop()` from exiting
    `Connection` leak when a ProxyClient `construct()` fails preventing `EventLoop::loop()` from exiting
    on Jul 14, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-07-14 21:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me