Repository: bitcoin
Issue: multiprocess: `ipc_tests` fail on *BSD
Labels: Tests

https://github.com/hebasto/bitcoin-core-nightly/actions/runs/12655211444/job/35264969094:
```
...
./test/ipc_tests.cpp(11): Entering test suite "ipc_tests"
./test/ipc_tests.cpp(12): Entering test case "ipc_tests"
terminate called after throwing an instance of 'std::system_error'
  what():  Invalid argument
2025-01-07T16:33:06.682484Z [unknown] [test/util/random.cpp:46] [SeedRandomStateForTest] Setting random seed for current tests to RANDOM_CTX_SEED=fa0a6578ac6467296e537ce4d0824c43c31c96f23b59a41c7bd63fe96397244a
2025-01-07T16:33:06.685389Z [test] [init/common.cpp:153] [LogPackageVersion] Bitcoin Core version v28.99.0-433412fd8478-dirty (release build)
2025-01-07T16:33:06.715163Z [test] [kernel/context.cpp:20] [operator()] Using the 'x86_shani(1way,2way)' SHA256 implementation
2025-01-07T16:33:06.715258Z [test] [random.cpp:114] [ReportHardwareRand] Using RdSeed as an additional entropy source
2025-01-07T16:33:06.715319Z [test] [random.cpp:117] [ReportHardwareRand] Using RdRand as an additional entropy source
2025-01-07T16:33:06.724146Z [test] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client first request from current thread, constructing waiter
2025-01-07T16:33:06.724475Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.add$Params (a = 1, b = 2)
2025-01-07T16:33:06.724918Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #1 FooInterface.add$Params (a = 1, b = 2)
2025-01-07T16:33:06.725025Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #1 FooInterface.add$Results (result = 3)
2025-01-07T16:33:06.725288Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.add$Results (result = 3)
2025-01-07T16:33:06.726546Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passOutPoint$Params (arg = "d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000")
2025-01-07T16:33:06.726863Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #2 FooInterface.passOutPoint$Params (arg = "d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000")
2025-01-07T16:33:06.726969Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #2 FooInterface.passOutPoint$Results (result = "d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000")
2025-01-07T16:33:06.727206Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passOutPoint$Results (result = "d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000")
2025-01-07T16:33:06.727512Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passUniValue$Params (arg = "{\\"i\\":1,\\"s\\":\\"two\\"}")
2025-01-07T16:33:06.727775Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #3 FooInterface.passUniValue$Params (arg = "{\\"i\\":1,\\"s\\":\\"two\\"}")
2025-01-07T16:33:06.727906Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #3 FooInterface.passUniValue$Results (result = "{\\"i\\":1,\\"s\\":\\"two\\"}")
2025-01-07T16:33:06.728111Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passUniValue$Results (result = "{\\"i\\":1,\\"s\\":\\"two\\"}")
2025-01-07T16:33:06.728494Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passTransaction$Params (arg = "\\002\\000\\000\\000\\001d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000\\000\\377\\377\\377\\377\\001\\000\\341\\365\\005\\000\\000\\000\\000\\000\\003\\000\\000\\000")
2025-01-07T16:33:06.730213Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #4 FooInterface.passTransaction$Params (arg = "\\002\\000\\000\\000\\001d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000\\000\\377\\377\\377\\377\\001\\000\\341\\365\\005\\000\\000\\000\\000\\000\\003\\000\\000\\000")
2025-01-07T16:33:06.730295Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #4 FooInterface.passTransaction$Results (result = "\\002\\000\\000\\000\\001d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000\\000\\377\\377\\377\\377\\001\\000\\341\\365\\005\\000\\000\\000\\000\\000\\003\\000\\000\\000")
2025-01-07T16:33:06.730417Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passTransaction$Results (result = "\\002\\000\\000\\000\\001d\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\000\\310\\000\\000\\000\\000\\377\\377\\377\\377\\001\\000\\341\\365\\005\\000\\000\\000\\000\\000\\003\\000\\000\\000")
2025-01-07T16:33:06.730550Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passVectorChar$Params (arg = "Hello")
2025-01-07T16:33:06.730651Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #5 FooInterface.passVectorChar$Params (arg = "Hello")
2025-01-07T16:33:06.730697Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #5 FooInterface.passVectorChar$Results (result = "Hello")
2025-01-07T16:33:06.730842Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passVectorChar$Results (result = "Hello")
2025-01-07T16:33:06.731889Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passBlockState$Params (arg = (mode = 1, result = 8, rejectReason = "reject reason", debugMessage = "debug message"))
2025-01-07T16:33:06.731989Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #6 FooInterface.passBlockState$Params (arg = (mode = 1, result = 8, rejectReason = "reject reason", debugMessage = "debug message"))
2025-01-07T16:33:06.732036Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #6 FooInterface.passBlockState$Results (result = (mode = 1, result = 8, rejectReason = "reject reason", debugMessage = "debug message"))
2025-01-07T16:33:06.732127Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passBlockState$Results (result = (mode = 1, result = 8, rejectReason = "reject reason", debugMessage = "debug message"))
2025-01-07T16:33:06.732273Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client send FooInterface.passBlockState$Params (arg = (mode = 0, result = 0, rejectReason = "", debugMessage = ""))
2025-01-07T16:33:06.732419Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server recv request  #7 FooInterface.passBlockState$Params (arg = (mode = 0, result = 0, rejectReason = "", debugMessage = ""))
2025-01-07T16:33:06.732463Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server send response #7 FooInterface.passBlockState$Results (result = (mode = 0, result = 0, rejectReason = "", debugMessage = ""))
2025-01-07T16:33:06.732555Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c38369c800} IPC client recv FooInterface.passBlockState$Results (result = (mode = 0, result = 0, rejectReason = "", debugMessage = ""))
2025-01-07T16:33:06.750906Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} IPC server destroy N2mp11ProxyServerIN3gen12FooInterfaceEEE
2025-01-07T16:33:06.751182Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} EventLoop::loop done, cancelling event listeners.
2025-01-07T16:33:06.751242Z [unknown] [test/ipc_test.cpp:60] [operator()] LOG0: {IpcPipeTest-5456/0x77c3833af000} EventLoop::loop bye.
...
```

For now, I'm not sure whether this issue is reliably reproducible.