From 1c1de334e9c0e3b4c72c3f3fe45b1f4df5ce4502 Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Mon, 2 Mar 2026 14:22:05 -0500 Subject: [PATCH] test: avoid interface_ipc.py race and null pointer dereference Avoid race condition in run_deprecated_mining_test caused by creating and immediately destroying an unused worker thread. This leads to test failures reported by maflcko in #34711 --- test/functional/interface_ipc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/interface_ipc.py b/test/functional/interface_ipc.py index 2fc4497a426..280d14d81d4 100755 --- a/test/functional/interface_ipc.py +++ b/test/functional/interface_ipc.py @@ -71,7 +71,9 @@ class IPCInterfaceTest(BitcoinTestFramework): def run_deprecated_mining_test(self): self.log.info("Running deprecated mining interface test") async def async_routine(): - ctx, init = await make_capnp_init_ctx(self) + node = self.nodes[0] + connection = await capnp.AsyncIoStream.create_unix_connection(node.ipc_socket_path) + init = capnp.TwoPartyClient(connection).bootstrap().cast_as(self.capnp_modules['init'].Init) self.log.debug("Calling deprecated makeMiningOld2 should raise an error") try: await init.makeMiningOld2()