Page MenuHomePhabricator

Revert "[chronik] Disable the Write Ahead Log for rocksdb"
ClosedPublic

Authored by Fabien on Jun 11 2024, 11:38.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC100f7f1f8583: Revert "[chronik] Disable the Write Ahead Log for rocksdb"
Summary

This reverts commit rABC9abcbdc2ec3bc8762996ed58f94e7f6a41ee3fa5 and reverts commit rABCe98e1a1ccd5dab8607ee1232ec41b12285822a35.

This fixed the qemu failures at the cost of a lower db resiliency.
Now that the code evolved a bit this might not be required anymore and
we can avoid this tradeoff.

We also need to use the main qemu version as the backport version throwns bus errors on arm sometimes.

Test Plan

Spam the tests using qemu

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@bot build-linux-arm build-linux-aarch64

Failed tests logs:

====== Bitcoin ABC functional tests: chronik_cors.py ======

------- Stdout: -------
2024-06-11T12:01:00.408000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_cors_141
2024-06-11T12:01:06.053000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_cors.py", line 30, in run_test
    self.restart_node(0, ["-chronik", "-chronikcors"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T12:01:06.104000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_cors.py", line 41, in <module>
    ChronikCorsTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_disable_token_index.py ======

------- Stdout: -------
2024-06-11T11:58:43.910000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_disable_token_index_79
2024-06-11T11:58:50.023000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_disable_token_index.py", line 192, in run_test
    self.restart_node(0, ["-chronik", "-chroniktokenindex=0"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T11:58:50.074000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_disable_token_index.py", line 247, in <module>
    ChronikDisableTokenIndex().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_lokad_id_group.py ======

------- Stdout: -------
2024-06-11T11:58:46.715000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_lokad_id_group_80
2024-06-11T11:58:53.861000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_lokad_id_group.py", line 242, in run_test
    self.restart_node(0, ["-chronik"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T11:58:53.912000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_lokad_id_group.py", line 273, in <module>
    ChronikLokadIdGroup().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_pause.py ======

------- Stdout: -------
2024-06-11T11:59:36.481000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_pause_102
2024-06-11T11:59:39.559000Z TestFramework (INFO): Restart to allow pause
2024-06-11T11:59:41.995000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_pause.py", line 43, in run_test
    self.restart_node(0, ["-chronik", "-chronikallowpause"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T11:59:42.046000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_pause.py", line 161, in <module>
    ChronikPauseTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_resync.py ======

------- Stdout: -------
2024-06-11T11:56:26.907000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_resync_49
2024-06-11T11:56:37.204000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_resync.py", line 65, in run_test
    self.restart_node(0, ["-chronik"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T11:56:37.255000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_resync.py", line 126, in <module>
    ChronikResyncTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized
====== Bitcoin ABC functional tests: chronik_serve.py ======

------- Stdout: -------
2024-06-11T11:59:42.159000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-linux-arm/test/tmp/test_runner_₿₵_  _20240611_114922/chronik_serve_105
2024-06-11T11:59:47.778000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 147, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 137, in _run_test_internal
    self.run_test()
  File "/work/test/functional/chronik_serve.py", line 50, in run_test
    self.restart_node(0, ["-chronik", "-chronikbind=0.0.0.0"])
  File "/work/test/functional/test_framework/test_framework.py", line 654, in restart_node
    self.start_node(i, extra_args)
  File "/work/test/functional/test_framework/test_framework.py", line 612, in start_node
    node.wait_for_rpc_connection()
  File "/work/test/functional/test_framework/test_node.py", line 348, in wait_for_rpc_connection
    raise FailedToStartError(
test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status -7 during initialization
2024-06-11T11:59:47.829000Z TestFramework (INFO): Stopping nodes
[node 0] Cleaning up leftover process
------- Stderr: -------
Traceback (most recent call last):
  File "/work/test/functional/chronik_serve.py", line 70, in <module>
    ChronikServeTest().main()
  File "/work/test/functional/test_framework/test_framework.py", line 170, in main
    exit_code = self.shutdown()
  File "/work/test/functional/test_framework/test_framework.py", line 396, in shutdown
    self.stop_nodes()
  File "/work/test/functional/test_framework/test_framework.py", line 645, in stop_nodes
    node.stop_node(wait=wait, wait_until_stopped=False)
  File "/work/test/functional/test_framework/test_node.py", line 501, in stop_node
    self.stop(wait=wait)
  File "/work/test/functional/test_framework/test_node.py", line 278, in __getattr__
    assert self.rpc is not None, self._node_msg("Error: RPC not initialized")
AssertionError: [node 0] Error: RPC not initialized

Each failure log is accessible here:
Bitcoin ABC functional tests: chronik_cors.py
Bitcoin ABC functional tests: chronik_disable_token_index.py
Bitcoin ABC functional tests: chronik_lokad_id_group.py
Bitcoin ABC functional tests: chronik_pause.py
Bitcoin ABC functional tests: chronik_resync.py
Bitcoin ABC functional tests: chronik_serve.py

Revert to previous qemu version

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

@bot build-linux-arm build-linux-aarch64

Squash another revert (qemu version bump)

@bot build-linux-arm build-linux-aarch64

Tail of the build log:

  File "/work/test/functional/setup_scripts/../test_framework/util.py", line 297, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
            self.wait_until(lambda: is_finalblock(next_blockhash))
''' not true after 60.0 seconds
2024-06-12T07:58:50.031000Z TestFramework (INFO): Stopping nodes
2024-06-12T07:58:50.284000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20240612_075738/setup_scripts/chronik-client_websocket_0
2024-06-12T07:58:50.285000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20240612_075738/setup_scripts/chronik-client_websocket_0/test_framework.log
2024-06-12T07:58:50.285000Z TestFramework (ERROR): 
2024-06-12T07:58:50.285000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20240612_075738/setup_scripts/chronik-client_websocket_0' to consolidate all logs
2024-06-12T07:58:50.286000Z TestFramework (ERROR): 
2024-06-12T07:58:50.286000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-06-12T07:58:50.286000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-06-12T07:58:50.286000Z TestFramework (ERROR): 
Running Unit Tests for Test Framework Modules
setup_scripts/chronik-client_websocket.py started
setup_scripts/chronik-client_websocket.py failed, Duration: 72 s

stdout:

stderr:


TEST                                      | STATUS    | DURATION

setup_scripts/chronik-client_websocket.py | ✖ Failed  | 72 s

ALL                                       | ✖ Failed  | 72 s (accumulated) 
Runtime: 72 s

Test runner for chronik-client_websocket completed with code 1
-----------------------|---------|----------|---------|---------|-----------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                 
-----------------------|---------|----------|---------|---------|-----------------------------------
All files              |   28.35 |     8.64 |   24.57 |   28.35 |                                   
 chronik-client        |     100 |      100 |     100 |     100 |                                   
  index.ts             |     100 |      100 |     100 |     100 |                                   
 chronik-client/proto  |    21.6 |     6.07 |    13.9 |   21.74 |                                   
  chronik.ts           |     6.1 |     0.83 |    2.54 |    6.09 | ...,3978-3985,3990-4027,4031-4036 
  chronikNode.ts       |   33.03 |    10.56 |    23.6 |   33.28 | ...,4991-5030,5038-5111,5146-5151 
 chronik-client/src    |   65.77 |    42.39 |   63.41 |   65.38 |                                   
  ChronikClient.ts     |    4.24 |        0 |       0 |    4.29 | 33-163,178-222,290-692            
  ChronikClientNode.ts |   90.84 |     72.8 |   96.38 |   90.84 | ...,1068,1078,1103,1115,1121,1127 
  failoverProxy.ts     |   75.22 |    51.61 |   62.06 |   74.52 | ...67,275-285,294,301,305,310,314 
  hex.ts               |   89.47 |       50 |      75 |   87.87 | 58,66-68                          
  validation.ts        |   93.33 |    81.81 |     100 |   92.59 | 33,39                             
-----------------------|---------|----------|---------|---------|-----------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1188']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='4189']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='337']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='3897']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='187']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='761']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1176']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='4148']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/chronik-client-integration-tests-junit.xml': No such file or directory
Build chronik-client-integration-tests failed with exit code 1
Fabien published this revision for review.Jun 13 2024, 14:32
This revision is now accepted and ready to land.Jun 13 2024, 16:16