Skip to content

Update libmultiprocess subtree: ~v10 -> v13 - #113

Merged
Sjors merged 4 commits into
stratum-mining:masterfrom
Sjors:2026/07/subtree
Jul 21, 2026
Merged

Sjors merged 4 commits into
stratum-mining:masterfrom
Sjors:2026/07/subtree

Conversation

@Sjors

@Sjors Sjors commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

v13 is the last version before the breaking changes that require #110. I'm doing this update in a separate PR to keep 110 focussed.

The previous update was a few commits before v11.

https://github.com/bitcoin-core/libmultiprocess/blob/master/doc/versions.md#v120

@Sjors Sjors changed the title Update libmultiprocess subtree to v12 Update libmultiprocess subtree: ~v11 -> v12 Jul 21, 2026
@Sjors

Sjors commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

I missed a tag, bitcoin-core/libmultiprocess#313. Will do another push to include the changes up to v13.

@Sjors
Sjors force-pushed the 2026/07/subtree branch from 34cda8d to 1d5cc3e Compare July 21, 2026 09:09
@Sjors Sjors changed the title Update libmultiprocess subtree: ~v11 -> v12 Update libmultiprocess subtree: ~v11 -> v13 Jul 21, 2026
@Sjors Sjors changed the title Update libmultiprocess subtree: ~v11 -> v13 Update libmultiprocess subtree: ~v10 -> v13 Jul 21, 2026
@Sjors

Sjors commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

TSan CI failure was not related to this subtree update, but fixing it here anyway.

@Sjors

Sjors commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Added another commit to hopefully pre-empt the TSan failure in #101: https://github.com/stratum-mining/sv2-tp/actions/runs/29757121925/job/88402278147?pr=101

@Sjors

Sjors commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Had to redo the subtree update in a not back-portable manner to avoid a merge conflict in the last TSan fix commit.

Sjors and others added 4 commits July 21, 2026 11:46
e8de5c7b68 Merge bitcoin-core/libmultiprocess#305: refactor: memcpy to std::ranges::copy to work around ubsan warn
9307e68e5a Merge bitcoin-core/libmultiprocess#306: doc: Bump version 12 > 13
fac7b9b7f6 refactor: memcpy to std::ranges::copy to work around ubsan warn
1bd7025609 Merge bitcoin-core/libmultiprocess#297: test: add map serialization round-trip coverage
438fdd243d doc: Bump version 12 > 13
28e056576a Merge bitcoin-core/libmultiprocess#269: proxy: add local connection limit to ListenConnections
39a10ce895 proxy: add local connection limit to ListenConnections()
43172f52d9 test: add dedicated ListenConnections coverage
033f812195 doc/version: Bump version 11 > 12
463d073cb8 test: rename vBool to vector_bool
16bf05dea0 Merge bitcoin-core/libmultiprocess#302: refactor: rename EventLoop::m_num_clients to m_num_refs
dd537da9e4 Merge bitcoin-core/libmultiprocess#301: test: recursive async IPC calls and cleanups
400291de00 Merge bitcoin-core/libmultiprocess#299: ci: remove libevent from Core CIs
092be515ad Merge bitcoin-core/libmultiprocess#285: Add ReadList helper
5b617880c5 Merge bitcoin-core/libmultiprocess#283: Add `makePool` method on `ThreadMap`
d499830415 refactor: rename EventLoop::m_num_clients to m_num_refs
6450345c98 type: reserve first when reading std::unordered_set
4d0f8db5f9 proxy: add ReadList helper and dedup map/set/vector read handlers
0e49d91186 Add `makePool` method on `ThreadMap`
5519f7f948 test: recursive async IPC calls
a29ceff40b ci: remove libevent from Core CIs
85df233845 test: add mapStringInt to foo.capnp to cover map serialization and deserialization

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: e8de5c7b68e0ae21c94ae92aa22e5c3b213f9c12
Synchronize the destructor write to m_disconnect_flag with reads and
writes from the socket thread. This fixes the TSan race reported during
sv2_connman_tests teardown.

Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
WITH_LOCK uses decltype(auto), so prefix increment returns a reference
that is read after the mutex is released. Copy the new template id
before leaving the critical section to avoid the data race.

The code reported at template_provider.cpp:465 was:

    uint64_t template_id{
        WITH_LOCK(m_tp_mutex, return ++m_template_id;)
    };

The TSan job in stratum-mining#101 reported:

    WARNING: ThreadSanitizer: data race
      Write of size 8 ... by thread T39
      (mutexes: write M0):
        #0 ... template_provider.cpp:465:38
      Previous read of size 8 ... by thread T41:
        #0 ... template_provider.cpp:465:38

Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
@Sjors
Sjors force-pushed the 2026/07/subtree branch from 4bd0a17 to 1216c84 Compare July 21, 2026 09:49

@enirox001 enirox001 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 1216c84

Was also working on a fix for the TSan CI failure in #101. The latest commit here fixes that

@Sjors
Sjors merged commit 1216c84 into stratum-mining:master Jul 21, 2026
20 checks passed
@Sjors
Sjors deleted the 2026/07/subtree branch July 21, 2026 10:43
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