Repository navigation
Closed
Description
2026-06-16T15:17:31.3998250Z �[0;34m node0 2026-06-16T15:17:21.699894Z [http.00] [wallet/sqlite.cpp:55] [TraceSqlCallback] [walletdb:trace] [/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch_ ₿🧪_/test_runner/test_runner_₿_🏃_20260616_150224/wallet_importdescriptors_103/node0/regtest/wallets/abort_import_wallet/wallet.dat] SQLite Statement: INSERT or REPLACE into main values(?, ?) �[0m
2026-06-16T15:17:31.3999070Z �[0;34m node0 2026-06-16T15:17:21.699970Z [http.00] [wallet/wallet.h:939] [WalletLogPrintf] [abort_import_wallet] RescanFromTime: Rescanning last 329 blocks �[0m
2026-06-16T15:17:31.3999900Z �[0;34m node0 2026-06-16T15:17:21.699981Z [http.00] [wallet/wallet.h:939] [WalletLogPrintf] [abort_import_wallet] Rescan started from block 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206... (slow variant inspecting all blocks) �[0m
2026-06-16T15:17:31.4000360Z �[0;34m node0 2026-06-16T15:17:21.705100Z [http.00] [wallet/wallet.h:939] [WalletLogPrintf] [abort_import_wallet] Scanning current mempool transactions. �[0m
2026-06-16T15:17:31.4000970Z �[0;34m node0 2026-06-16T15:17:21.705121Z [http.00] [wallet/wallet.h:939] [WalletLogPrintf] [abort_import_wallet] Rescan completed in 5ms �[0m
2026-06-16T15:17:31.4001230Z �[0;36m test 2026-06-16T15:17:21.705640Z TestFramework (ERROR): Unexpected exception: �[0m
2026-06-16T15:17:31.4001400Z �[0;36m Traceback (most recent call last):�[0m
2026-06-16T15:17:31.4001830Z �[0;36m File "/Users/runner/work/bitcoin/bitcoin/repo_archive/test/functional/test_framework/test_framework.py", line 144, in main�[0m
2026-06-16T15:17:31.4001970Z �[0;36m self.run_test()�[0m
2026-06-16T15:17:31.4002090Z �[0;36m ~~~~~~~~~~~~~^^�[0m
2026-06-16T15:17:31.4002700Z �[0;36m File "/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch_ ₿🧪_/build-aarch64-apple-darwin24.6.0/test/functional/wallet_importdescriptors.py", line 962, in run_test�[0m
2026-06-16T15:17:31.4002880Z �[0;36m self.test_rescan_fails_import()�[0m
2026-06-16T15:17:31.4003060Z �[0;36m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^�[0m
2026-06-16T15:17:31.4003710Z �[0;36m File "/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch_ ₿🧪_/build-aarch64-apple-darwin24.6.0/test/functional/wallet_importdescriptors.py", line 193, in test_rescan_fails_import�[0m
2026-06-16T15:17:31.4003990Z �[0;36m raise AssertionError("importdescriptors unexpectedly succeeded")�[0m
2026-06-16T15:17:31.4004520Z �[0;36m AssertionError: importdescriptors unexpectedly succeeded�[0m
2026-06-16T15:17:31.4004800Z �[0;36m test 2026-06-16T15:17:21.709227Z TestFramework (DEBUG): Closing down network thread �[0m
Activity
fanquake commentedon Jun 16, 2026
cc @polespinasa
polespinasa commentedon Jun 16, 2026
The test failing is the "abort rescan" case.
The test fails due to a race condition in the c++ code. It can happen that an
abortrescancall is ignored by the actual rescan code.#35512 should fix it by moving the code that makes the rescan ignore the
abortrescancallfanquake commentedon Jun 19, 2026
https://github.com/bitcoin/bitcoin/actions/runs/27796442874/job/82257168562?pr=32606
Sjors commentedon Jun 19, 2026
This looks like another instance: https://github.com/bitcoin/bitcoin/actions/runs/27831971948/job/82370724326?pr=32857 in #32857.
pinheadmz commentedon Jun 21, 2026
Another failure, same test but not the race patched in #35512
https://github.com/bitcoin/bitcoin/actions/runs/27913805625/job/82595425742?pr=35182
Failed in the ancestor commits test. I don't think its related to the PR because at that commit nothing significant has been changed in the HTTP server (just implementing new classes)
hiSandog commentedon Jun 25, 2026
The later failure in the ancestor-commits test looks like it may be a second timing assumption in the same functional test, not just the
abortrescanpath fixed by #35512. In both snippets the rescan can complete very quickly before the test observes the intended blocked/aborted state. If possible, making the test hold the rescan at a deterministic synchronization point would avoid asserting on a race between the RPC call and a very short rescan.polespinasa commentedon Jun 25, 2026
I don't think this is possible.
#35579 should fix the race condition reported in #35544 (comment) by prioritizing checking the reservation of wallet rescan before any lock is taken.
hebasto commentedon Jun 28, 2026
Happened on FreeBSD 14.4 as well:
hebasto commentedon Jul 6, 2026
... and on NetBSD 10.1:
Merge bitcoin/bitcoin#35579: wallet: reserve walletrescan before chec…
Merge bitcoin/bitcoin#35579: wallet: reserve walletrescan before chec…
Merge bitcoin/bitcoin#35579: wallet: reserve walletrescan before chec…