Repository navigation
Description
Failure
feature_protx_version.py intermittently fails in ARM64 linux64_tsan-test / Test source because ThreadSanitizer detects a data race in the vendored BLS legacy curve-constant initialization. This is a real concurrency defect, not merely a test timeout.
- Failing job: https://github.com/thepastaclaw/dash/actions/runs/34656617746/job/103454469736
- Same-head successful TSAN job: https://github.com/thepastaclaw/dash/actions/runs/34656619215/job/103454562099
- Head:
c0e65a01eccfe5d4ddc814a47bd5a36544ee93c1 - PR: backport: v0.26 bitcoin#27656, bitcoin#27996, bitcoin#28083 thepastaclaw/dash#37
- Base:
02c72bec7c356a8ee22330753d77ee05efc35212
The failing runner exhausted all three attempts. The last attempt failed after 41 seconds while mining a quorum at feature_protx_version.py:108: node2 exited under TSAN and the Python RPC client reported ConnectionResetError. The independent successful run on exactly the same head passed this test in 185 seconds and completed successfully. No rerun was requested during this investigation.
Root cause evidence
TSAN reports concurrent accesses to global ep2_curve_get_s3(bn_st*)::s3:
Read: memcpy -> bn_copy
Write: memset -> bn_read_str
Both: CActiveMasternodeManager::Sign (src/active/masternode.cpp:293)
-> ActiveDKGSession::SendContributions (src/active/dkgsession.cpp:103)
-> ActiveDKGSession::Contribute
Threads: d-llmq-106-0 and d-llmq-100-0
Both hold mutex M0 in read mode.
src/dashbls/src/legacy.cpp:31-40 initializes static bn_t s3 behind a plain static bool fInitialized, with no synchronization around the check, bn_read_str, or subsequent bn_copy. Concurrent first calls can both initialize the shared constant, allowing one thread to read while another writes. The neighboring ep2_curve_get_s32 helper has the same initialization pattern, although this job's report specifically names s3.
Scope
The affected BLS code, active masternode/DKG code, and functional test are byte-for-byte unchanged from the PR base and local upstream/develop. PR #37 changes only configure.ac: a comment correction and removal of automatic Boost.MultiIndex safe mode for debug/fuzz builds. The TSAN setup does not enable debug/fuzz, and the race is in RELIC/BLS static state rather than a Boost container. The PR branch was left untouched.
This is distinct from #7530: the reported address is a legacy curve-constant global, not mimalloc allocator metadata.
Reproduction
Use the existing ARM64 TSAN CI configuration (ci/test/00_setup_env_native_tsan.sh, clang-19, --with-sanitizers=thread, and the project's TSAN suppressions with halt_on_error=1). From the configured build tree, run:
python3 test/functional/test_runner.py feature_protx_version.py --timeout-factor=4Repeat with fresh daemon processes to exercise simultaneous first-use legacy signing in different DKG quorum threads. The failure is schedule-dependent; an independent job on the identical head passed. A separate local TSAN build/base-branch execution was not performed; the evidence above is from the existing CI logs and direct source comparison.
The fork has issues disabled, so this report is filed in the upstream project. Tracking investigation: https://github.com/thepastaclaw/tracker/issues/3061
Activity
thepastaclaw commentedon Sep 13, 2026
Observed in CI run https://github.com/dashpay/dash/actions/runs/34768643110/job/103758836994 on PR #7676: ARM64 TSAN reports a race in legacy BLS curve initialization (ep2_curve_get_s3, CActiveMasternodeManager::Sign at src/active/masternode.cpp:293) while feature_protx_version.py runs. This PR only changes test/fuzz/test_runner.py (RPC fuzz target generation), so the failure is unrelated to the PR diff and matches this existing intermittent failure tracker.