`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
  3. xyzconstant referenced this in commit 7cd90aec9a on Jul 15, 2026
  4. xyzconstant referenced this in commit fecf305c2f on Jul 15, 2026
  5. xyzconstant referenced this in commit 9b93947bd0 on Jul 15, 2026
  6. xyzconstant referenced this in commit 82f7ef2c0c on Jul 15, 2026
  7. xyzconstant referenced this in commit 9078674779 on Jul 15, 2026
  8. xyzconstant referenced this in commit a2e00075e5 on Jul 21, 2026
  9. xyzconstant referenced this in commit e4530f8048 on Jul 21, 2026
  10. xyzconstant referenced this in commit f3355b5e50 on Jul 21, 2026
  11. xyzconstant referenced this in commit a8b64c203c on Aug 4, 2026
  12. xyzconstant referenced this in commit c435ef7dc5 on Aug 4, 2026
  13. xyzconstant referenced this in commit 8fb3b5bf0d on Aug 4, 2026
  14. xyzconstant referenced this in commit bb473690c9 on Aug 5, 2026
  15. ryanofsky closed this on Aug 11, 2026

  16. ryanofsky referenced this in commit 2220df68c9 on Aug 11, 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-08-26 00:30 UTC

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