https://github.com/bitcoin/bitcoin/pull/32345 fixes different bitcoin-node crashes during shutdown when IPC connections are not terminated cleanly (either disconnected or unresponsive), letting the node shut down cleanly without blocking in all cases.
But testing https://github.com/bitcoin/bitcoin/pull/32345 in combination with https://github.com/bitcoin/bitcoin/pull/29409 and a custom client that connects and disconnects in a loop @darosior found another crash that seems to happen when a client disconnects in the middle of an IPC call apparently because an assumption in the ~Connection destructor is violated:
that cap’n proto will garbage collect server objects right away when the canp::RpcSystem is destroyed.
Apparently this does not happen if an asynchronous call is currently in progress.
I was able to reproduce the problem with https://github.com/ryanofsky/bitcoin/commit/87b2ae6314e49e637e509c1c1fae852ac83c45ab (tag) and I think the fix will probably require the Connection refcounting described #176 (comment) that I started implementing but abandoned later #176 (comment) because it didn’t seem necessary.