Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add stress tests for initialization #23289

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

jamesob
Copy link
Contributor

@jamesob jamesob commented Oct 15, 2021

In the course of coming up with a test plan for #23280, I thought it would be neat to include a Python snippet showing how I tested the initialization process. I quickly realized I was reinventing the functional test framework... so here's a new test.

This change bangs init around like the Fonz hitting a jukebox. It adds some interesting (read: lazy and random) coverage for the initialization process by

  • interrupting init with SIGTERM after certain log statements,
  • interrupting init at random points, and
  • starting init with some essential data missing (block files, block indices, etc.) to test init error paths.

As far as I can tell, some of these code paths are uncovered otherwise (namely the startup errors).


Incidentally, I think I may have uncovered some kind of a bug or race condition with indexing initialization based on an intermittent failure in this testcase. This test sometimes fails after shutting down immediately after loadblk thread start:

2021-10-15T21:14:51.295000Z TestFramework (INFO): Starting node and will exit after line 'loadblk thread start'
  36   │ 2021-10-15T21:14:51.296000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
  37   │ 2021-10-15T21:14:51.493000Z TestFramework (INFO): terminating node after 110 log lines seen
  38   │ 2021-10-15T21:14:51.625000Z TestFramework (INFO): Starting node and will exit after line 'txindex thread start'
  39   │ 2021-10-15T21:14:51.625000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
  ------> [[ FAILURE HERE ]] 2021-10-15T21:15:21.626000Z TestFramework (WARNING): missed line {bail_line}; bailing now after {num_lines} lines

and then fails to start up afterwards. Combined logs showing Error: txindex best block of the index goes beyond pruned data, when the node under test is not pruned:

  node0 2021-10-15T21:16:51.848439Z [shutoff] [validationinterface.cpp:244] [ChainStateFlushed] Enqueuing ChainStateFlushed: block hash=1014bc4ff4917602ae53d10e9dfe230af4b7d52a6cdaa8a47798b9c288180907
   node0 2021-10-15T21:16:51.848954Z [shutoff] [init.cpp:302] [Shutdown] Shutdown: done
   test  2021-10-15T21:16:51.882000Z TestFramework (ERROR): Unexpected exception caught during testing
				     Traceback (most recent call last):
				       File "/home/james/src/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
					 self.run_test()
				       File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 87, in run_test
					 check_clean_start()
				       File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 60, in check_clean_start
					 node.wait_for_rpc_connection()
				       File "/home/james/src/bitcoin/test/functional/test_framework/test_node.py", line 224, in wait_for_rpc_connection
					 raise FailedToStartError(self._node_msg(
				     test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization
   test  2021-10-15T21:16:51.882000Z TestFramework (DEBUG): Closing down network thread
   test  2021-10-15T21:16:51.933000Z TestFramework (INFO): Stopping nodes
   test  2021-10-15T21:16:51.933000Z TestFramework.node0 (DEBUG): Stopping node

   node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
   node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
   node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
   node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
   node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)

@dongcarl dongcarl self-requested a review October 15, 2021 21:53
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from d4d2bed to 7e70350 Compare October 15, 2021 22:01
@DrahtBot DrahtBot added the Tests label Oct 15, 2021
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from 7e70350 to 1888c8d Compare October 15, 2021 22:15
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

Strong concept ACK. I tried doing this manually for a few releases in the past, but a functional test simplifies that a lot.

test/functional/test_runner.py Outdated Show resolved Hide resolved
@practicalswift
Copy link
Contributor

Strong Concept ACK

Functional testing, unit testing, fuzz testing and now stress testing: great to see!

Fault injection testing and mutation testing next in line? :)

Copy link
Contributor

@lsilva01 lsilva01 left a comment

Choose a reason for hiding this comment

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

Tested ACK 1888c8d on Ubuntu 20.04

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

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

tACK 1888c8d

@jamesob jamesob force-pushed the 2021-10-stress-test-init branch 2 times, most recently from dd1f1b5 to 71ba24a Compare October 19, 2021 16:04
@dongcarl
Copy link
Contributor

Code Review ACK 71ba24a

This is great, and is very helpful for testing initialization! Thank you James!

Naive idea Since GDB has a Python API, perhaps someone can use that for more granular stress testing (shouldn't be in this PR since it seems like quite a large undertaking)

@jamesob jamesob requested a review from maflcko October 19, 2021 21:02
@mzumsande
Copy link
Contributor

Concept ACK, very cool idea.

I also encountered the intermittent Error: txindex best block of the index goes beyond pruned data once while running the new test yesterday - what is the best way to proceed? Should that issue be analysed/fixed before merging this?

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

ACK

test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/test_framework/test_node.py Outdated Show resolved Hide resolved
test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/feature_init.py Outdated Show resolved Hide resolved
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch 2 times, most recently from 1768b27 to c870ee0 Compare October 20, 2021 14:08
@jamesob
Copy link
Contributor Author

jamesob commented Oct 20, 2021

I also encountered the intermittent Error: txindex best block of the index goes beyond pruned data once while running the new test yesterday - what is the best way to proceed? Should that issue be analysed/fixed before merging this?

On the one hand, holding off on merging test coverage because there may be a bug in master seems wrong. On the other hand, spurious test failures in CI for a hard-to-track-down bug will be annoying.

For context and neither here nor there: this bug seems pretty minor - under very particular circumstances (SIGTERM during just the right init point) it may cause a user to have to reindex. But that said, we should certainly have a better understanding of why it's happening.

@maflcko
Copy link
Member

maflcko commented Oct 20, 2021

If txindex is causing issues here, maybe submit it in a follow-up pull request?

@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from c870ee0 to ff2fede Compare October 20, 2021 14:28
To allow easier access to the node's datadir and debug logs.
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from ff2fede to b32f5a5 Compare October 20, 2021 15:26
Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Concept ACK. Nice idea!

test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/feature_init.py Show resolved Hide resolved
test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/feature_init.py Show resolved Hide resolved
test/functional/feature_init.py Outdated Show resolved Hide resolved
test/functional/test_framework/test_node.py Show resolved Hide resolved
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from b32f5a5 to e1220b7 Compare October 20, 2021 16:50
@mzumsande
Copy link
Contributor

mzumsande commented Oct 20, 2021

For context and neither here nor there: this bug seems pretty minor - under very particular circumstances (SIGTERM during just the right init point) it may cause a user to have to reindex. But that said, we should certainly have a better understanding of why it's happening.

I see different things locally: For me, the failure happens in roughly 1-2% of the runs in the will exit after line 'txindex thread start' run, whereas check_clean_start of the previous run for loadblk still passes.
Accordingly, if I remove all lines except txindex thread start from lines_to_bail_after, I'll still get occasional fails (without any SIGTERM involved), so the failure does seem to occur "unprovoked".

@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from e1220b7 to 9c055d2 Compare October 20, 2021 18:29
@fanquake
Copy link
Member

Concept ACK

@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from 9c055d2 to d5f0dd1 Compare October 21, 2021 02:29
@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 26, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #10102 (Multiprocess bitcoin by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot mentioned this pull request Oct 26, 2021
@jamesob jamesob force-pushed the 2021-10-stress-test-init branch from d5f0dd1 to d9803f7 Compare October 26, 2021 16:50
@jamesob
Copy link
Contributor Author

jamesob commented Oct 26, 2021

Okay, I've addressed a bunch of feedback and disabled txindex for the time being. I think this is a good first pass on this test provided all the non-deterministic failures have been removed. @mzumsande/@dongcarl if you'd like to PR the indexing change and fix you're welcome to, otherwise I can take care of it shortly.

mzumsande added a commit to mzumsande/bitcoin that referenced this pull request Oct 26, 2021
This allows filters to be reconstructed when the best known block is
the Genesis block without needing to reindex.
It fixes Init errors seen in bitcoin#23289.
@mzumsande
Copy link
Contributor

Okay, I've addressed a bunch of feedback and disabled txindex for the time being. I think this is a good first pass on this test provided all the non-deterministic failures have been removed. @mzumsande/@dongcarl if you'd like to PR the indexing change and fix you're welcome to, otherwise I can take care of it shortly.

I opened #23365 to fix the intermittent issue.

@laanwj
Copy link
Member

laanwj commented Nov 10, 2021

Concept ACK

@jamesob
Copy link
Contributor Author

jamesob commented Nov 16, 2021

Anything left here? I think as things stand this is a stable test that adds some good coverage. AFAIK there's no outstanding feedback aside from a few nits and marginal suggestions.

mzumsande added a commit to mzumsande/bitcoin that referenced this pull request Nov 26, 2021
This allows filters to be reconstructed when the best known block is
the Genesis block without needing to reindex.
It fixes Init errors seen in bitcoin#23289.
@laanwj
Copy link
Member

laanwj commented Nov 30, 2021

Code review ACK d9803f7

@laanwj laanwj merged commit aef8c7c into bitcoin:master Nov 30, 2021
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 1, 2021
d9803f7 test: add stress tests for initialization (James O'Beirne)
23f8561 test: add node.chain_path and node.debug_log_path (James O'Beirne)

Pull request description:

  In the course of coming up with a test plan for bitcoin#23280, I thought it would be neat to include a Python snippet showing how I tested the initialization process. I quickly realized I was reinventing the functional test framework... so here's a new test.

  This change bangs init around like the Fonz hitting a jukebox. It adds some interesting (read: lazy and random) coverage for the initialization process by
  - interrupting init with SIGTERM after certain log statements,
  - interrupting init at random points, and
  - starting init with some essential data missing (block files, block indices, etc.) to test init error paths.

  As far as I can tell, some of these code paths are uncovered otherwise (namely the startup errors).

  ---

  Incidentally, I think I may have uncovered some kind of a bug or race condition with indexing initialization based on an intermittent failure in this testcase. This test sometimes fails after shutting down immediately after `loadblk` thread start:
  ```
  2021-10-15T21:14:51.295000Z TestFramework (INFO): Starting node and will exit after line 'loadblk thread start'
    36   │ 2021-10-15T21:14:51.296000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    37   │ 2021-10-15T21:14:51.493000Z TestFramework (INFO): terminating node after 110 log lines seen
    38   │ 2021-10-15T21:14:51.625000Z TestFramework (INFO): Starting node and will exit after line 'txindex thread start'
    39   │ 2021-10-15T21:14:51.625000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    ------> [[ FAILURE HERE ]] 2021-10-15T21:15:21.626000Z TestFramework (WARNING): missed line {bail_line}; bailing now after {num_lines} lines
  ```
  and then fails to start up afterwards. Combined logs showing `Error: txindex best block of the index goes beyond pruned data`, when the node under test is not pruned:

  ```
    node0 2021-10-15T21:16:51.848439Z [shutoff] [validationinterface.cpp:244] [ChainStateFlushed] Enqueuing ChainStateFlushed: block hash=1014bc4ff4917602ae53d10e9dfe230af4b7d52a6cdaa8a47798b9c288180907
     node0 2021-10-15T21:16:51.848954Z [shutoff] [init.cpp:302] [Shutdown] Shutdown: done
     test  2021-10-15T21:16:51.882000Z TestFramework (ERROR): Unexpected exception caught during testing
       Traceback (most recent call last):
         File "/home/james/src/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
   self.run_test()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 87, in run_test
   check_clean_start()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 60, in check_clean_start
   node.wait_for_rpc_connection()
         File "/home/james/src/bitcoin/test/functional/test_framework/test_node.py", line 224, in wait_for_rpc_connection
   raise FailedToStartError(self._node_msg(
       test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization
     test  2021-10-15T21:16:51.882000Z TestFramework (DEBUG): Closing down network thread
     test  2021-10-15T21:16:51.933000Z TestFramework (INFO): Stopping nodes
     test  2021-10-15T21:16:51.933000Z TestFramework.node0 (DEBUG): Stopping node

     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
  ```

ACKs for top commit:
  laanwj:
    Code review ACK d9803f7

Tree-SHA512: 4d80dc399daf199a6222e81e47d12d830dc7af07355eddbb7f52479a676a645b8d3d45093ff54a9295f01a163b2f4fe0e038e83fc269969e03d4cfda69eaf111
@jnewbery
Copy link
Contributor

jnewbery commented Dec 1, 2021

I'm surprised this was merged, given that there were no ACKs on the latest branch, and there were still unresolved approach/implementation issues and comments, eg:

@fanquake
Copy link
Member

fanquake commented Dec 2, 2021

This is also the cause of the recent sporadic failures in our CI. See #23646.

maflcko pushed a commit that referenced this pull request Dec 13, 2021
9600ea0 test: Add edge case of pruning up to index height (Martin Zumsande)
698c524 index: Fix backwards search for bestblock (Martin Zumsande)

Pull request description:

  This PR attempts to fix an intermittent Init issue encountered during the stress testing of #23289, which relates to the pruning-compatible filter reconstruction logic introduced in #15946.

  The problem would occur when the node starts with `-txindex=1` but `ThreadSync` is interrupted after it sets `m_best_block_index` to Genesis, and before it gets do any further work.
  In that case, during the next restart of the node, an Init error would be thrown because  `BaseIndex::Init()` tries to backtrack from the tip to the last block which has been successfully indexed (here: Genesis), but the backtracking logic didn't work properly in this case:
  The loop
  `while (block_to_test && block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA))` checks if a predecessor exists **before** performing the check `block_to_test == block` and then possbily setting `prune_violation = false`
  If `block_to_test` and `block` are the Genesis block this check will not be reached because `block->pprev` does not exist.

  To reproduce this bug on regtest:
  1) start a node with a fresh datadir using `-txindex=1` (or any other index)
  2) stop and restart without any index
  3) mine a block
  3) stop and restart again with the index enabled
  ->InitError `Error: txindex best block of the index goes beyond pruned data. (...)`

  Fix this by requiring that we have the data for the block of the current iteration `block` (instead of requiring it for the predecessor `block->pprev`)
  That way, the check for `block_to_test == block` is also reached when `block_to_test` is the Genesis block.
  No longer requiring the data of `block->pprev` also means that we can now prune up to `m_best_block_index` height without requiring a reindex (one block more than before). I added this edge case to `feature_blockfilterindex_prune.py`, the new version should fail on master.

ACKs for top commit:
  ryanofsky:
    Partial code review ACK 9600ea0 for the code change, not the test changes. (Test changes are indirect and little over my head.) It seems obvious that previous code `prune_violation = true, while (block->pprev)` would incorrectly detect a prune violation at the genesis block, and the fix here make sense and looks correct.

Tree-SHA512: c717f372cee8fd49718b1b18bfe237aa6ba3ff4468588c10e1272d7a2ef3981d10af4e57de51dec295e2ca72d441bc6c2812f7990011a94d7f818775e3ff1a38
0xB10C pushed a commit to 0xB10C/bitcoin that referenced this pull request Dec 13, 2021
This allows filters to be reconstructed when the best known block is
the Genesis block without needing to reindex.
It fixes Init errors seen in bitcoin#23289.
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 13, 2021
9600ea0 test: Add edge case of pruning up to index height (Martin Zumsande)
698c524 index: Fix backwards search for bestblock (Martin Zumsande)

Pull request description:

  This PR attempts to fix an intermittent Init issue encountered during the stress testing of bitcoin#23289, which relates to the pruning-compatible filter reconstruction logic introduced in bitcoin#15946.

  The problem would occur when the node starts with `-txindex=1` but `ThreadSync` is interrupted after it sets `m_best_block_index` to Genesis, and before it gets do any further work.
  In that case, during the next restart of the node, an Init error would be thrown because  `BaseIndex::Init()` tries to backtrack from the tip to the last block which has been successfully indexed (here: Genesis), but the backtracking logic didn't work properly in this case:
  The loop
  `while (block_to_test && block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA))` checks if a predecessor exists **before** performing the check `block_to_test == block` and then possbily setting `prune_violation = false`
  If `block_to_test` and `block` are the Genesis block this check will not be reached because `block->pprev` does not exist.

  To reproduce this bug on regtest:
  1) start a node with a fresh datadir using `-txindex=1` (or any other index)
  2) stop and restart without any index
  3) mine a block
  3) stop and restart again with the index enabled
  ->InitError `Error: txindex best block of the index goes beyond pruned data. (...)`

  Fix this by requiring that we have the data for the block of the current iteration `block` (instead of requiring it for the predecessor `block->pprev`)
  That way, the check for `block_to_test == block` is also reached when `block_to_test` is the Genesis block.
  No longer requiring the data of `block->pprev` also means that we can now prune up to `m_best_block_index` height without requiring a reindex (one block more than before). I added this edge case to `feature_blockfilterindex_prune.py`, the new version should fail on master.

ACKs for top commit:
  ryanofsky:
    Partial code review ACK 9600ea0 for the code change, not the test changes. (Test changes are indirect and little over my head.) It seems obvious that previous code `prune_violation = true, while (block->pprev)` would incorrectly detect a prune violation at the genesis block, and the fix here make sense and looks correct.

Tree-SHA512: c717f372cee8fd49718b1b18bfe237aa6ba3ff4468588c10e1272d7a2ef3981d10af4e57de51dec295e2ca72d441bc6c2812f7990011a94d7f818775e3ff1a38
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
a14d537 test: add stress tests for initialization (James O'Beirne)
3f80ebc test: add node.chain_path and node.debug_log_path (James O'Beirne)

Pull request description:

  In the course of coming up with a test plan for #23280, I thought it would be neat to include a Python snippet showing how I tested the initialization process. I quickly realized I was reinventing the functional test framework... so here's a new test.

  This change bangs init around like the Fonz hitting a jukebox. It adds some interesting (read: lazy and random) coverage for the initialization process by
  - interrupting init with SIGTERM after certain log statements,
  - interrupting init at random points, and
  - starting init with some essential data missing (block files, block indices, etc.) to test init error paths.

  As far as I can tell, some of these code paths are uncovered otherwise (namely the startup errors).

  ---

  Incidentally, I think I may have uncovered some kind of a bug or race condition with indexing initialization based on an intermittent failure in this testcase. This test sometimes fails after shutting down immediately after `loadblk` thread start:
  ```
  2021-10-15T21:14:51.295000Z TestFramework (INFO): Starting node and will exit after line 'loadblk thread start'
    36   │ 2021-10-15T21:14:51.296000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    37   │ 2021-10-15T21:14:51.493000Z TestFramework (INFO): terminating node after 110 log lines seen
    38   │ 2021-10-15T21:14:51.625000Z TestFramework (INFO): Starting node and will exit after line 'txindex thread start'
    39   │ 2021-10-15T21:14:51.625000Z TestFramework.node0 (DEBUG): bitcoind started, waiting for RPC to come up
    ------> [[ FAILURE HERE ]] 2021-10-15T21:15:21.626000Z TestFramework (WARNING): missed line {bail_line}; bailing now after {num_lines} lines
  ```
  and then fails to start up afterwards. Combined logs showing `Error: txindex best block of the index goes beyond pruned data`, when the node under test is not pruned:

  ```
    node0 2021-10-15T21:16:51.848439Z [shutoff] [validationinterface.cpp:244] [ChainStateFlushed] Enqueuing ChainStateFlushed: block hash=1014bc4ff4917602ae53d10e9dfe230af4b7d52a6cdaa8a47798b9c288180907
     node0 2021-10-15T21:16:51.848954Z [shutoff] [init.cpp:302] [Shutdown] Shutdown: done
     test  2021-10-15T21:16:51.882000Z TestFramework (ERROR): Unexpected exception caught during testing
       Traceback (most recent call last):
         File "/home/james/src/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
   self.run_test()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 87, in run_test
   check_clean_start()
         File "/home/james/src/bitcoin/./test/functional/stress_init.py", line 60, in check_clean_start
   node.wait_for_rpc_connection()
         File "/home/james/src/bitcoin/test/functional/test_framework/test_node.py", line 224, in wait_for_rpc_connection
   raise FailedToStartError(self._node_msg(
       test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization
     test  2021-10-15T21:16:51.882000Z TestFramework (DEBUG): Closing down network thread
     test  2021-10-15T21:16:51.933000Z TestFramework (INFO): Stopping nodes
     test  2021-10-15T21:16:51.933000Z TestFramework.node0 (DEBUG): Stopping node

     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
     node0 stderr Error: txindex best block of the index goes beyond pruned data. Please disable the index or reindex (which will download the whole blockchain again)
  ```

ACKs for top commit:
  laanwj:
    Code review ACK a14d537

Tree-SHA512: 4d80dc399daf199a6222e81e47d12d830dc7af07355eddbb7f52479a676a645b8d3d45093ff54a9295f01a163b2f4fe0e038e83fc269969e03d4cfda69eaf111
maflcko pushed a commit to bitcoin-core/gui that referenced this pull request Jan 3, 2022
8904f17 test: enable txindex in feature_init (James O'Beirne)
93db6d8 test: feature_init: retain debug.log and improve detection (James O'Beirne)
24fcf6e test: feature_init: tweak all .ldb files of a certain type (James O'Beirne)
a8ffbc0 test: add TestNode.wait_for_debug_log (James O'Beirne)
a2fb62b test: introduce TestNode.debug_log_bytes (James O'Beirne)

Pull request description:

  Hopefully fixes #23646.

  This makes a few changes to feature_init (along the lines of the discussion here: bitcoin/bitcoin#23289 (comment)). The changes are detailed in the specific commits, but a summary might be:
  - more robust log-line detection (at the expense of maybe being slower)
  - retain all debug.log content
  - perturb .ldb files in a more complete way

Top commit has no ACKs.

Tree-SHA512: 9c8900998fdb96d3cc92bd30c4eeda2a47e9787e6432546d458c17f24eb9e2b6b3eb573db225172888ca71d7a62260f497f83827597b982b9e35c5452cb6e514
rebroad pushed a commit to rebroad/bitcoin that referenced this pull request Feb 3, 2022
This allows filters to be reconstructed when the best known block is
the Genesis block without needing to reindex.
It fixes Init errors seen in bitcoin#23289.
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 23, 2022
Summary:
```
This change bangs init around like the Fonz hitting a jukebox.
```

Backport of [[bitcoin/bitcoin#23289 | core#23289]].

Test Plan:
  ninja check-functional

Reviewers: #bitcoin_abc, PiRK, sdulfari

Reviewed By: #bitcoin_abc, PiRK, sdulfari

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D12598
@bitcoin bitcoin locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.