test: Fix shutdown vptr race in BlockFilterIndexSync bench#34734
Merged
fanquake merged 1 commit intobitcoin:masterfrom Mar 6, 2026
Merged
test: Fix shutdown vptr race in BlockFilterIndexSync bench#34734fanquake merged 1 commit intobitcoin:masterfrom
fanquake merged 1 commit intobitcoin:masterfrom
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste |
sedited
approved these changes
Mar 5, 2026
Member
|
ACK fa79098 |
|
ACK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the
BlockFilterIndexSyncmay fail tsan.Diff to reproduce:
and then running the tsan CI pod:
MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_native_tsan.sh" ./ci/test_run_all.shAfter about 3 runs, it will fail. It is also possible to run in a loop inside the pod:
while TSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1" /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/bin/bench_bitcoin -filter=BlockFilterIndexSync -sanity-check ; do true ; doneThe output will be:
Fix this by following the shutdown sequence of first stopping the index and then desctructing it, instead of doing both at the same time (stopping inside the desctructor).
Also, apply the comment
// Shutdown sequence (c.f. Shutdown() in init.cpp)consistently, while touching this topic of the codebase.Also, remove the unused
SyncWithValidationInterfaceQueue, which is redundant to the priorBlockUntilSyncedToCurrentChain. See also the last comment in the pull request that introduced this: #26188 (comment)Given that devs did not apply the redundant sync in two new cases, it seems fine to remove it.