Skip to content

Conversation

ryanofsky
Copy link
Collaborator

Fix std::function CustomBuildField overload which is incompatible with a recent change in 3a96cdc from #172 which changed generated IPC client code to pass it an rvalue std::function reference instead of an lvalue reference.

Motivation for this change is to avoid a build error in bitcoin/bitcoin#29409, when rebased on top of bitcoin/bitcoin#32641 which includes #172.

ryanofsky added 2 commits June 3, 2025 15:40
Fix std::function CustomBuildField overload which is incompatible with a recent
change in 3a96cdc from
bitcoin-core#172 which changed
generated IPC client code to pass it an rvalue std::function reference instead
of an lvalue reference.

There was no test coverage for the type-function.h header earlier but the next
commit adds a test which would have caught the problem in the CustomBuildField
declaration.

Motivation for this change is to avoid a build error in
bitcoin/bitcoin#29409 when rebased on top of
bitcoin/bitcoin#32641 which includes
bitcoin-core#172
Copy link
Collaborator

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 688140b

@ryanofsky ryanofsky merged commit 59030c6 into bitcoin-core:master Jun 11, 2025
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jun 13, 2025
…459d3a

4c3373459d3a test: Test disconnects during IPC calls
5c40b1786a72 Prevent IPC server crash if disconnected during IPC call
42caa69d5711 Prevent EventLoop async cleanup thread early exit during shutdown
dd92e847b083 doc: Document ProxyClientBase destroy_connection option
2421393af2d8 Improve IPC client disconnected exceptions
1254c5e6bdd8 refactor: Add clang thread safety annotations to EventLoop
df1be80ad3fa refactor: Remove DestructorCatcher and AsyncCallable
295837d9973c refactor: Drop addClient/removeClient methods
e3c7e1ca1df5 refactor: Use EventLoopRef instead of addClient/removeClient
4dfdfaae3cb5 refactor: Add ProxyContext EventLoop* member
7d1a2a9b4eb8 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 4c3373459d3a2abfa2c5e143f271ec8a4e25b346
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jun 16, 2025
…6e45ee

2dcfb46e45ee test: Test disconnects during IPC calls
7dc8befd86ef Prevent IPC server crash if disconnected during IPC call
fc89c23766d1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 2dcfb46e45ee39be62d4caff136b9a9412dfe5c4
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jun 16, 2025
…a0b5f4

84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 84cf56a0b5f496b02e761dc8fb243cd6a69b3888
Sjors added a commit to Sjors/bitcoin that referenced this pull request Jun 24, 2025
f15724a3dd clang-tidy: drop 'bitcoin-*' check
99d52a3cbb ci: add github actions jobs to test gcc and libc++
5049b81657 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
97f8435ca9 proxy-types: fix clang-tidy EnumCastOutOfRange error
980ab41ef8 proxy-types: fix clang-tidy StackAddressEscape error
6d7b261d65 ci: add github actions job testing clang-20, clang-tidy, and iwyu
996281b0f0 iwyu: fix add/remove include errors
753d2b10cc util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb type-number: fix clang-tidy modernize-use-nullptr error
07a741bf69 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f384 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6ade mpgen: disable clang-tidy misc-no-recursion error
c5498aa11b tidy: copy clang-tidy file from bitcoin core
258a617c1e Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5 test: Test disconnects during IPC calls
949573da84 Prevent IPC server crash if disconnected during IPC call
0198397580 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d2 doc: Document ProxyClientBase destroy_connection option
56fff76f94 Improve IPC client disconnected exceptions
9b8ed3dc5f refactor: Add clang thread safety annotations to EventLoop
52256e730f refactor: Remove DestructorCatcher and AsyncCallable
f24894794a refactor: Drop addClient/removeClient methods
2b830e558e refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb refactor: Add ProxyContext EventLoop* member
9aaeec3678 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2 proxy-io.h: Add more detailed EventLoop comment
5108445e5d test: Add test coverage for client & server disconnections
59030c68cb Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1df test: Add coverage for type-function.h
8b96229da5 type-function.h: Fix CustomBuildField overload
fa2ff9a668 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: f15724a3ddc7ac7330c8aedb9f11c14361a9133d
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jun 24, 2025
…7c1eec

258a617c1eec Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 258a617c1eecb7c8f4f6cb1c5fa3f5f3501d5e8f
Sjors added a commit to Sjors/bitcoin that referenced this pull request Jun 27, 2025
1ff5ad1ef9 ci: add thread sanitizer job
ff5141c5df proxy-io: fix race condition ProxyClientBase cleanup handler
5975fef52c mptest: fix race condition in TestSetup constructor
8954cc0377 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a755 ci: add gnu32 cross-compiled 32-bit build
15bf349000 doc: fix typo found by DrahtBot
1a598d5905 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc ci: test libc++ instead of libstdc++ in one job
76313450c2 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51 proxy-types: fix clang-tidy EnumCastOutOfRange error
060a739269 proxy-types: fix clang-tidy StackAddressEscape error
977d721020 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5 iwyu: fix add/remove include errors
753d2b10cc util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb type-number: fix clang-tidy modernize-use-nullptr error
07a741bf69 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f384 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6ade mpgen: disable clang-tidy misc-no-recursion error
c5498aa11b tidy: copy clang-tidy file from bitcoin core
258a617c1e Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5 test: Test disconnects during IPC calls
949573da84 Prevent IPC server crash if disconnected during IPC call
0198397580 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d2 doc: Document ProxyClientBase destroy_connection option
56fff76f94 Improve IPC client disconnected exceptions
9b8ed3dc5f refactor: Add clang thread safety annotations to EventLoop
52256e730f refactor: Remove DestructorCatcher and AsyncCallable
f24894794a refactor: Drop addClient/removeClient methods
2b830e558e refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb refactor: Add ProxyContext EventLoop* member
9aaeec3678 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2 proxy-io.h: Add more detailed EventLoop comment
5108445e5d test: Add test coverage for client & server disconnections
59030c68cb Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1df test: Add coverage for type-function.h
8b96229da5 type-function.h: Fix CustomBuildField overload
fa2ff9a668 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 1ff5ad1ef9cedd45834ee2bb522c56b3afe89c60
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jul 1, 2025
…adc9ae

725beeadc9ae doc: fix DrahtBot LLM Linter error
7455fc0e3781 type-context: revert client disconnect workaround
47f052c3ed94 proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use
f6bd4385c057 mptest: fix MemorySanitizer: use-of-uninitialized-value
8218a1d8760d proxy-io: fix race conditions in disconnect callback code
88695fc05303 proxy-io: fix race conditions in ProxyClientBase cleanup handler
63bd2a201dc2 doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex
81d58f5580e8 refactor: Rename ProxyClient cleanup_it variable
07230f259f55 refactor: rename ProxyClient<Thread>::m_cleanup_it
0d986ff144cd mptest: fix race condition in TestSetup constructor
d2f6aa2e84ef ci: add thread sanitizer job
c0efaa5e8cb1 Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence.
3a6db38e561f ci: rename configs to .bash
401e0ce1d9c3 ci: add copyright to bash scripts
e956467ae464 ci: export LC_ALL
8954cc0377d8 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a75546 ci: add gnu32 cross-compiled 32-bit build
15bf349000eb doc: fix typo found by DrahtBot
1a598d5905f7 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc6e ci: test libc++ instead of libstdc++ in one job
76313450c2c4 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51ba proxy-types: fix clang-tidy EnumCastOutOfRange error
060a73926956 proxy-types: fix clang-tidy StackAddressEscape error
977d721020f6 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5da iwyu: fix add/remove include errors
753d2b10cc27 util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb1a type-number: fix clang-tidy modernize-use-nullptr error
07a741bf6946 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9d9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f38485 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6adefa mpgen: disable clang-tidy misc-no-recursion error
c5498aa11ba6 tidy: copy clang-tidy file from bitcoin core
258a617c1eec Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 725beeadc9ae30664aa3ed12a9ac2b77a9d8d4e0
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jul 1, 2025
…583f2b

6f340a583f2b doc: fix DrahtBot LLM Linter error
c6f7fdf17350 type-context: revert client disconnect workaround
e09143d2ea2f proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use
84b292fcc4db mptest: fix MemorySanitizer: use-of-uninitialized-value
fe4a188803c6 proxy-io: fix race conditions in disconnect callback code
d8011c83608e proxy-io: fix race conditions in ProxyClientBase cleanup handler
97e82ce19c47 doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex
81d58f5580e8 refactor: Rename ProxyClient cleanup_it variable
07230f259f55 refactor: rename ProxyClient<Thread>::m_cleanup_it
0d986ff144cd mptest: fix race condition in TestSetup constructor
d2f6aa2e84ef ci: add thread sanitizer job
c0efaa5e8cb1 Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence.
3a6db38e561f ci: rename configs to .bash
401e0ce1d9c3 ci: add copyright to bash scripts
e956467ae464 ci: export LC_ALL
8954cc0377d8 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a75546 ci: add gnu32 cross-compiled 32-bit build
15bf349000eb doc: fix typo found by DrahtBot
1a598d5905f7 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc6e ci: test libc++ instead of libstdc++ in one job
76313450c2c4 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51ba proxy-types: fix clang-tidy EnumCastOutOfRange error
060a73926956 proxy-types: fix clang-tidy StackAddressEscape error
977d721020f6 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5da iwyu: fix add/remove include errors
753d2b10cc27 util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb1a type-number: fix clang-tidy modernize-use-nullptr error
07a741bf6946 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9d9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f38485 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6adefa mpgen: disable clang-tidy misc-no-recursion error
c5498aa11ba6 tidy: copy clang-tidy file from bitcoin core
258a617c1eec Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 6f340a583f2b29b32866c289d5f4d7662b4fe90e
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jul 1, 2025
…05c238

a11e6905c238 Merge bitcoin-core/libmultiprocess#186: Fix mptest failures in bitcoin CI
6f340a583f2b doc: fix DrahtBot LLM Linter error
c6f7fdf17350 type-context: revert client disconnect workaround
e09143d2ea2f proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use
84b292fcc4db mptest: fix MemorySanitizer: use-of-uninitialized-value
fe4a188803c6 proxy-io: fix race conditions in disconnect callback code
d8011c83608e proxy-io: fix race conditions in ProxyClientBase cleanup handler
97e82ce19c47 doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex
81d58f5580e8 refactor: Rename ProxyClient cleanup_it variable
07230f259f55 refactor: rename ProxyClient<Thread>::m_cleanup_it
c0efaa5e8cb1 Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence.
0d986ff144cd mptest: fix race condition in TestSetup constructor
d2f6aa2e84ef ci: add thread sanitizer job
3a6db38e561f ci: rename configs to .bash
401e0ce1d9c3 ci: add copyright to bash scripts
e956467ae464 ci: export LC_ALL
8954cc0377d8 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a75546 ci: add gnu32 cross-compiled 32-bit build
15bf349000eb doc: fix typo found by DrahtBot
1a598d5905f7 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc6e ci: test libc++ instead of libstdc++ in one job
76313450c2c4 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51ba proxy-types: fix clang-tidy EnumCastOutOfRange error
060a73926956 proxy-types: fix clang-tidy StackAddressEscape error
977d721020f6 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5da iwyu: fix add/remove include errors
753d2b10cc27 util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb1a type-number: fix clang-tidy modernize-use-nullptr error
07a741bf6946 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9d9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f38485 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6adefa mpgen: disable clang-tidy misc-no-recursion error
c5498aa11ba6 tidy: copy clang-tidy file from bitcoin core
258a617c1eec Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: a11e6905c238dc35a8bbef995190296bc6329d49
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Aug 8, 2025
…34bad2

b4120d34bad2 Merge bitcoin-core/libmultiprocess#192: doc: fix typos
6ecbdcd35a93 doc: fix typos
a11e6905c238 Merge bitcoin-core/libmultiprocess#186: Fix mptest failures in bitcoin CI
6f340a583f2b doc: fix DrahtBot LLM Linter error
c6f7fdf17350 type-context: revert client disconnect workaround
e09143d2ea2f proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use
84b292fcc4db mptest: fix MemorySanitizer: use-of-uninitialized-value
fe4a188803c6 proxy-io: fix race conditions in disconnect callback code
d8011c83608e proxy-io: fix race conditions in ProxyClientBase cleanup handler
97e82ce19c47 doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex
81d58f5580e8 refactor: Rename ProxyClient cleanup_it variable
07230f259f55 refactor: rename ProxyClient<Thread>::m_cleanup_it
c0efaa5e8cb1 Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence.
0d986ff144cd mptest: fix race condition in TestSetup constructor
d2f6aa2e84ef ci: add thread sanitizer job
3a6db38e561f ci: rename configs to .bash
401e0ce1d9c3 ci: add copyright to bash scripts
e956467ae464 ci: export LC_ALL
8954cc0377d8 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a75546 ci: add gnu32 cross-compiled 32-bit build
15bf349000eb doc: fix typo found by DrahtBot
1a598d5905f7 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc6e ci: test libc++ instead of libstdc++ in one job
76313450c2c4 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51ba proxy-types: fix clang-tidy EnumCastOutOfRange error
060a73926956 proxy-types: fix clang-tidy StackAddressEscape error
977d721020f6 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5da iwyu: fix add/remove include errors
753d2b10cc27 util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb1a type-number: fix clang-tidy modernize-use-nullptr error
07a741bf6946 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9d9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f38485 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6adefa mpgen: disable clang-tidy misc-no-recursion error
c5498aa11ba6 tidy: copy clang-tidy file from bitcoin core
258a617c1eec Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5f4 test: Test disconnects during IPC calls
949573da8411 Prevent IPC server crash if disconnected during IPC call
019839758085 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960e1 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d20a doc: Document ProxyClientBase destroy_connection option
56fff76f940b Improve IPC client disconnected exceptions
9b8ed3dc5f87 refactor: Add clang thread safety annotations to EventLoop
52256e730f51 refactor: Remove DestructorCatcher and AsyncCallable
f24894794adf refactor: Drop addClient/removeClient methods
2b830e558e61 refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb65 refactor: Add ProxyContext EventLoop* member
9aaeec3678d3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2f0 proxy-io.h: Add more detailed EventLoop comment
5108445e5d16 test: Add test coverage for client & server disconnections
59030c68cb5f Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1dffc test: Add coverage for type-function.h
8b96229da58e type-function.h: Fix CustomBuildField overload
fa2ff9a66842 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: b4120d34bad2de28141c5770f6e8df8e54898987
Sjors added a commit to Sjors/bitcoin that referenced this pull request Aug 12, 2025
c090cc8619 build: require CapnProto 1.0.1 or better
b4120d34ba Merge bitcoin-core/libmultiprocess#192: doc: fix typos
6ecbdcd35a doc: fix typos
a11e6905c2 Merge bitcoin-core/libmultiprocess#186: Fix mptest failures in bitcoin CI
6f340a583f doc: fix DrahtBot LLM Linter error
c6f7fdf173 type-context: revert client disconnect workaround
e09143d2ea proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use
84b292fcc4 mptest: fix MemorySanitizer: use-of-uninitialized-value
fe4a188803 proxy-io: fix race conditions in disconnect callback code
d8011c8360 proxy-io: fix race conditions in ProxyClientBase cleanup handler
97e82ce19c doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex
81d58f5580 refactor: Rename ProxyClient cleanup_it variable
07230f259f refactor: rename ProxyClient<Thread>::m_cleanup_it
c0efaa5e8c Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence.
0d986ff144 mptest: fix race condition in TestSetup constructor
d2f6aa2e84 ci: add thread sanitizer job
3a6db38e56 ci: rename configs to .bash
401e0ce1d9 ci: add copyright to bash scripts
e956467ae4 ci: export LC_ALL
8954cc0377 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors
757e13a755 ci: add gnu32 cross-compiled 32-bit build
15bf349000 doc: fix typo found by DrahtBot
1a598d5905 clang-tidy: drop 'bitcoin-*' check
cbb1e43fdc ci: test libc++ instead of libstdc++ in one job
76313450c2 type-context: disable clang-tidy UndefinedBinaryOperatorResult error
4896e7fe51 proxy-types: fix clang-tidy EnumCastOutOfRange error
060a739269 proxy-types: fix clang-tidy StackAddressEscape error
977d721020 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu
0d5f1faae5 iwyu: fix add/remove include errors
753d2b10cc util: fix clang-tidy modernize-use-equals-default error
ae4f1dc2bb type-number: fix clang-tidy modernize-use-nullptr error
07a741bf69 proxy-types: fix clang-tidy bugprone-use-after-move error
3673114bc9 proxy-types: fix clang-tidy bugprone-use-after-move error
422923f384 proxy-types: fix clang-tidy bugprone-use-after-move error
c6784c6ade mpgen: disable clang-tidy misc-no-recursion error
c5498aa11b tidy: copy clang-tidy file from bitcoin core
258a617c1e Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception
84cf56a0b5 test: Test disconnects during IPC calls
949573da84 Prevent IPC server crash if disconnected during IPC call
0198397580 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges)
ea38392960 Prevent EventLoop async cleanup thread early exit during shutdown
616d9a75d2 doc: Document ProxyClientBase destroy_connection option
56fff76f94 Improve IPC client disconnected exceptions
9b8ed3dc5f refactor: Add clang thread safety annotations to EventLoop
52256e730f refactor: Remove DestructorCatcher and AsyncCallable
f24894794a refactor: Drop addClient/removeClient methods
2b830e558e refactor: Use EventLoopRef instead of addClient/removeClient
315ff537fb refactor: Add ProxyContext EventLoop* member
9aaeec3678 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting
f58c8d8ba2 proxy-io.h: Add more detailed EventLoop comment
5108445e5d test: Add test coverage for client & server disconnections
59030c68cb Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload
688140b1df test: Add coverage for type-function.h
8b96229da5 type-function.h: Fix CustomBuildField overload
fa2ff9a668 scripted-diff: Remove copyright year (ranges)

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: c090cc8619d6c003b86cbf63c1d43e64ff167d78
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Aug 18, 2025
2581258 ipc: Handle bitcoin-wallet disconnections (Ryan Ofsky)
2160995 ipc: Add Ctrl-C handler for spawned subprocesses (Ryan Ofsky)
0c28068 doc: Improve IPC interface comments (Ryan Ofsky)
7f65aac ipc: Avoid waiting for clients to disconnect when shutting down (Ryan Ofsky)
6eb09fd test: Add unit test coverage for Init and Shutdown code (Ryan Ofsky)
9a9fb19 ipc: Use EventLoopRef instead of addClient/removeClient (Ryan Ofsky)
e886c65 Squashed 'src/ipc/libmultiprocess/' changes from 27c7e8e5a581..b4120d34bad2 (Ryan Ofsky)

Pull request description:

  This PR fixes various problems when IPC connections are broken or hang which were reported in bitcoin-core/libmultiprocess#123, bitcoin-core/libmultiprocess#176, and bitcoin-core/libmultiprocess#182. The different fixes are described in commit messages.

  ---

  The first two commits of this PR update the libmultiprocess subtree including the following PRs:

  - bitcoin-core/libmultiprocess#181
  - bitcoin-core/libmultiprocess#179
  - bitcoin-core/libmultiprocess#160
  - bitcoin-core/libmultiprocess#184
  - bitcoin-core/libmultiprocess#187
  - bitcoin-core/libmultiprocess#186
  - bitcoin-core/libmultiprocess#192

  The subtree changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh).

  The remaining commits are:

  - [`9a9fb19536fa` ipc: Use EventLoopRef instead of addClient/removeClient](9a9fb19)
  - [`6eb09fd6141f` test: Add unit test coverage for Init and Shutdown code](6eb09fd)
  - [`7f65aac78b95` ipc: Avoid waiting for clients to disconnect when shutting down](7f65aac)
  - [`0c28068ceb7b` doc: Improve IPC interface comments](0c28068)
  - [`216099591632` ipc: Add Ctrl-C handler for spawned subprocesses](2160995)
  - [`2581258ec200` ipc: Handle bitcoin-wallet disconnections](2581258)

  The new commits depend on the subtree update, and because the subtree update includes an incompatible API change, the "Use EventLoopRef" commit needs to be part of the same PR to avoid breaking the build. The other commits also make sense to merge at the same time because the bitcoin & libmultiprocess changes were written and tested together.

  ---

  This PR is part of the [process separation project](#28722).

ACKs for top commit:
  Sjors:
    re-utACK 2581258
  josibake:
    code review ACK 2581258
  pinheadmz:
    re-ACK 2581258

Tree-SHA512: 0095aa22d507803e2a2d46eff51fb6caf965cc0c97ccfa615bd97805d5d51e66a5b4b040640deb92896438b1fb9f6879847124c9d0e120283287bfce37b8d748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants