Repository navigation
Closed
Labels
Description
Seen locally in https://drahtbot.space/temp_scratch/feature_assumeutxo_265.tar.zstd:
commit should be roughly 40e7d4c and the command was RUN_UNIT_TESTS=false MAKEJOBS="-j8" FILE_ENV="./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" ./ci/test_run_all.sh
node1 2025-10-15T18:56:48.763939Z [shutoff] [txdb.cpp:151] [virtual bool CCoinsViewDB::BatchWrite(CoinsViewCacheCursor &, const uint256 &)] [coindb] Writing final batch of 0.00 MiB
node1 2025-10-15T18:56:48.763948Z [shutoff] [txdb.cpp:153] [virtual bool CCoinsViewDB::BatchWrite(CoinsViewCacheCursor &, const uint256 &)] [coindb] Committed 0 changed transaction outputs (out of 0) to coin database...
node1 2025-10-15T18:56:48.763958Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write coins cache to disk (0 coins, 256KiB) completed (0.02ms)
node1 2025-10-15T18:56:48.763966Z [shutoff] [validationinterface.cpp:246] [void ValidationSignals::ChainStateFlushed(ChainstateRole, const CBlockLocator &)] [validation] Enqueuing ChainStateFlushed: block hash=5d3144f90878dbabd3a42352be3294df923c93198e1399b93d07292c9cd1e1ce
node1 2025-10-15T18:56:48.763997Z [shutoff] [validation.cpp:2837] [bool Chainstate::FlushStateToDisk(BlockValidationState &, FlushStateMode, int)] [coindb] Writing chainstate to disk: flush mode=ALWAYS, prune=0, large=0, critical=0, periodic=0
node1 2025-10-15T18:56:48.764007Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write block and undo data to disk started
node1 2025-10-15T18:56:48.764041Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write block and undo data to disk completed (0.03ms)
node1 2025-10-15T18:56:48.764050Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write block index to disk started
node1 2025-10-15T18:56:48.764061Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write block index to disk completed (0.01ms)
node1 2025-10-15T18:56:48.764067Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write coins cache to disk (0 coins, 256KiB) started
node1 2025-10-15T18:56:48.764076Z [shutoff] [txdb.cpp:151] [virtual bool CCoinsViewDB::BatchWrite(CoinsViewCacheCursor &, const uint256 &)] [coindb] Writing final batch of 0.00 MiB
node1 2025-10-15T18:56:48.764083Z [shutoff] [txdb.cpp:153] [virtual bool CCoinsViewDB::BatchWrite(CoinsViewCacheCursor &, const uint256 &)] [coindb] Committed 0 changed transaction outputs (out of 0) to coin database...
node1 2025-10-15T18:56:48.764092Z [shutoff] [logging/timer.h:58] [void BCLog::Timer<std::chrono::duration<long long, std::ratio<1, 1000>>>::Log(const std::string &) [TimeType = std::chrono::duration<long long, std::ratio<1, 1000>>]] [bench] FlushStateToDisk: write coins cache to disk (0 coins, 256KiB) completed (0.02ms)
node1 2025-10-15T18:56:48.764100Z [shutoff] [validationinterface.cpp:246] [void ValidationSignals::ChainStateFlushed(ChainstateRole, const CBlockLocator &)] [validation] Enqueuing ChainStateFlushed: block hash=6d9186a0db6df121d2006c40c7827c447afe6329b705666bca1744b72c71f0ad
node1 2025-10-15T18:56:48.767027Z [shutoff] [init.cpp:410] [void Shutdown(NodeContext &)] Shutdown done
test 2025-10-15T18:56:48.791717Z TestFramework.node1 (DEBUG): Node stopped
test 2025-10-15T18:56:48.791816Z TestFramework (INFO): Checking that blocks are segmented on disk
test 2025-10-15T18:56:48.791990Z TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
File "/ci_container_base/test/functional/test_framework/test_framework.py", line 198, in main
self.run_test()
File "/ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/test/functional/feature_assumeutxo.py", line 629, in run_test
assert not self.has_blockfile(n1, "00002"), "too many blockfiles"
AssertionError: too many blockfiles
Activity
b-l-u-e commentedon Jan 26, 2026
i tried studying from the report shared above realized that maybe the assertion
assert not self.has_blockfile(n1, "00002")was too strict perhaps maybe we can condition it because segmentation works as expectedcoz with
-fastpruneit does 64KB blockfiles... coz node1 runs two chainstates concurrently NORMAL and ASSUMED...so this segmentation keeps their blocks separateso when NORMAL syncs enough blocks to fill blk00000.dat it creates blk00002.dat
from node1/regtest/debug.log
i think or rather maybe test should verify segmentation works blk00001.dat exists for ASSUMED blocks not just limit to 2 files
maflcko commentedon Jan 27, 2026
I think this is
-stopatheightnot working?maflcko commentedon Jan 27, 2026
Hmmm, maybe not, because this diff is passing:
maflcko commentedon Jan 29, 2026
I tried to reproduce this with the command below, but failed. I guess this fixed itself?
while ( TEST_RUNNER_EXTRA="$( for i in {1..400}; do echo -n "feature_assumeutxo.py "; done )" RUN_UNIT_TESTS=false MAKEJOBS="-j8" FILE_ENV="./ci/test/00_setup_env_native_nowallet.sh" ./ci/test_run_all.sh ) ; do echo _ >> /tmp/runs ; donemaflcko commentedon Jan 29, 2026
Nvm. It happened again after a few thousand iterations:
https://drahtbot.space/temp_scratch/feature_assumeutxo_201.tar.zstd
maflcko commentedon Jan 30, 2026
Thanks for taking a look. I am primarily interested in why this is happening intermittently. Usually this happens due to one thread being slower than another. For example in #34425, a sleep added in the right place will make a particular intermittent issue appear more deterministically:
I'd be great to find a diff to make this one reproduce deterministically as well.
b-l-u-e commentedon Jan 30, 2026
Let me try to add a sleep between when NORMAL and ASSUMED chainstates start the syncing
b-l-u-e commentedon Feb 3, 2026
so i did a test repro run by adding a sleep in
ConnectTip()for the snapshot chainstate slows it down giving the normal chainstate time to fillblk00000.datand roll toblk00002.datbefore-stopatheighttriggersand also i made change in
feature_assumeutxo.pywith a 10swait_until_stoppedso as the slowed snapshot can reach-stopatheight).--nocleanup --tmpdir=/tmp/bitcoin_test_assumeutxo_reproto see the results-fastprune, blockfiles are 64 KiB-stopatheight=359blk00002.datsinceblk00001.datis reserved for snapshotmaflcko commentedon Mar 18, 2026
diff to reproduce:
Merge bitcoin/bitcoin#34852: test: Fix intermittent issue in feature_…
Merge bitcoin/bitcoin#34852: test: Fix intermittent issue in feature_…
Merge bitcoin/bitcoin#34852: test: Fix intermittent issue in feature_…
Merge bitcoin/bitcoin#34852: test: Fix intermittent issue in feature_…