Page MenuHomePhabricator

scripted-diff: rename and de-globalise g_cs_orphans
ClosedPublic

Authored by Fabien on Tue, May 28, 14:01.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC5f3292a2d196: scripted-diff: rename and de-globalise g_cs_orphans
Summary
-BEGIN VERIFY SCRIPT-
sed -i -e 's/static RecursiveMutex/mutable Mutex/' src/txorphanage.h
sed -i -e '/RecursiveMutex/d' src/txorphanage.cpp
sed -i -e 's/g_cs_orphans/m_mutex/g' $(git grep -l g_cs_orphans src/)
-END VERIFY SCRIPT-

Completes backport of core#26295:
https://github.com/bitcoin/bitcoin/pull/26295/commits/7082ce3e88d77456d60a5a66bd38807fbd66f311

Depends on D16234.

Test Plan
ninja all check-all

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Tue, May 28, 14:01

Tail of the build log:

chronik_lokad_id_group.py                  | ○ Skipped | 0 s
chronik_mempool_conflicts.py               | ○ Skipped | 0 s
chronik_pause.py                           | ○ Skipped | 0 s
chronik_plugins_setup.py                   | ○ Skipped | 0 s
chronik_raw_tx.py                          | ○ Skipped | 0 s
chronik_resync.py                          | ○ Skipped | 0 s
chronik_script_confirmed_txs.py            | ○ Skipped | 0 s
chronik_script_history.py                  | ○ Skipped | 0 s
chronik_script_unconfirmed_txs.py          | ○ Skipped | 0 s
chronik_script_utxos.py                    | ○ Skipped | 0 s
chronik_serve.py                           | ○ Skipped | 0 s
chronik_spent_by.py                        | ○ Skipped | 0 s
chronik_token_alp.py                       | ○ Skipped | 0 s
chronik_token_broadcast_txs.py             | ○ Skipped | 0 s
chronik_token_burn.py                      | ○ Skipped | 0 s
chronik_token_id_group.py                  | ○ Skipped | 0 s
chronik_token_parse_failure.py             | ○ Skipped | 0 s
chronik_token_script_group.py              | ○ Skipped | 0 s
chronik_token_slp_fungible.py              | ○ Skipped | 0 s
chronik_token_slp_mint_vault.py            | ○ Skipped | 0 s
chronik_token_slp_nft1.py                  | ○ Skipped | 0 s
chronik_tx.py                              | ○ Skipped | 0 s
chronik_tx_removal_order.py                | ○ Skipped | 0 s
chronik_ws.py                              | ○ Skipped | 0 s
chronik_ws_ordering.py                     | ○ Skipped | 0 s
chronik_ws_ping.py                         | ○ Skipped | 0 s
chronik_ws_script.py                       | ○ Skipped | 0 s
feature_bind_port_discover.py              | ○ Skipped | 0 s
feature_bind_port_externalip.py            | ○ Skipped | 0 s
interface_usdt_net.py                      | ○ Skipped | 0 s
interface_usdt_utxocache.py                | ○ Skipped | 0 s
interface_usdt_validation.py               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 2691 s (accumulated) 
Runtime: 539 s

[200/499] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.005s

OK
[201/499] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[217/499] Running seeder test suite
PASSED: seeder test suite
[274/499] bitcoin: testing net_tests
FAILED: src/test/CMakeFiles/check-bitcoin-net_tests 
cd /work/abc-ci-builds/build-tsan/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-tsan/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-tsan/test/log && /usr/bin/cmake -E env TSAN_OPTIONS=second_deadlock_stack=1:log_path=stdout TSAN_OPTIONS=suppressions=/work/test/sanitizer_suppressions/tsan:log_path=stdout /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-tsan/test/log/bitcoin-net_tests.log /work/abc-ci-builds/build-tsan/src/test/test_bitcoin --run_test=net_tests --logger=HRF,message:JUNIT,message,bitcoin-net_tests.xml --catch_system_errors=no
Running 19 test cases...
../../src/test/net_tests.cpp(1262): error: in "net_tests/net_group_limit": check connman->checkContiguousAddressesConnection( { {0, NODE_NETWORK | NODE_AVALANCHE, 50}, {1, NODE_NETWORK, 10}, {2, NODE_NETWORK, 10}, {3, NODE_NETWORK, 10}, {4, NODE_NETWORK, 10}, {5, NODE_NETWORK, 10}, {6, NODE_NETWORK, 10}, {7, NODE_NETWORK, 10}, {8, NODE_NETWORK, 10}, {9, NODE_NETWORK, 10}, {10, NODE_NETWORK, 10}, {11, NODE_NETWORK, 10}, }, options.m_max_outbound_full_relay, 50 ) has failed

*** 1 failure is detected in the test module "Bitcoin ABC unit tests"
[286/499] bitcoin: testing intmath_tests
ninja: build stopped: subcommand failed.
Build build-tsan failed with exit code 1
This revision is now accepted and ready to land.Tue, May 28, 16:05

it failed why I reviewed. It seems unrelated, but I have never seen this error before so better rerun the tests

Failed tests logs:

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

------- Stdout: -------
2024-05-28T16:18:23.223000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_161121/p2p_compactblocks_83
2024-05-28T16:18:24.870000Z TestFramework (INFO): Testing SENDCMPCT p2p message... 
2024-05-28T16:18:25.450000Z TestFramework (INFO): Testing compactblock construction...
2024-05-28T16:18:30.810000Z TestFramework (INFO): Testing compactblock requests... 
2024-05-28T16:18:31.121000Z TestFramework (INFO): Testing getblocktxn requests...
2024-05-28T16:18:31.646000Z TestFramework (INFO): Testing getblocktxn handler...
2024-05-28T16:18:32.280000Z TestFramework (INFO): Testing compactblock requests/announcements not at chain tip...
2024-05-28T16:18:32.540000Z TestFramework (INFO): Testing handling of low-work compact blocks...
2024-05-28T16:18:32.595000Z TestFramework (INFO): Testing handling of incorrect blocktxn responses...
2024-05-28T16:18:32.804000Z TestFramework (INFO): Testing end-to-end block relay...
2024-05-28T16:18:32.966000Z TestFramework (INFO): Testing handling of invalid compact blocks...
2024-05-28T16:18:33.872000Z TestFramework (INFO): Testing reconstructing compact blocks from all peers...
2024-05-28T16:18:33.979000Z TestFramework (ERROR): Assertion failed
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/p2p_compactblocks.py", line 926, in run_test
    self.test_compactblock_reconstruction_multiple_peers(
  File "/work/test/functional/p2p_compactblocks.py", line 826, in test_compactblock_reconstruction_multiple_peers
    assert tx.hash in mempool
AssertionError
2024-05-28T16:18:34.029000Z TestFramework (INFO): Stopping nodes
2024-05-28T16:18:34.281000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_161121/p2p_compactblocks_83
2024-05-28T16:18:34.281000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_161121/p2p_compactblocks_83/test_framework.log
2024-05-28T16:18:34.281000Z TestFramework (ERROR): 
2024-05-28T16:18:34.281000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_161121/p2p_compactblocks_83' to consolidate all logs
2024-05-28T16:18:34.282000Z TestFramework (ERROR): 
2024-05-28T16:18:34.282000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-05-28T16:18:34.282000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-05-28T16:18:34.282000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_compactblocks.py

PiRK requested changes to this revision.Tue, May 28, 18:07

Same unit test failing as in the previous run. And also p2p_compactblocks.py now seems flaky (same failure here and in D16233)

This revision now requires changes to proceed.Tue, May 28, 18:07

Failed tests logs:

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

------- Stdout: -------
2024-05-28T18:19:04.638000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_181103/p2p_compactblocks_83
2024-05-28T18:19:06.223000Z TestFramework (INFO): Testing SENDCMPCT p2p message... 
2024-05-28T18:19:06.800000Z TestFramework (INFO): Testing compactblock construction...
2024-05-28T18:19:12.378000Z TestFramework (INFO): Testing compactblock requests... 
2024-05-28T18:19:12.689000Z TestFramework (INFO): Testing getblocktxn requests...
2024-05-28T18:19:13.214000Z TestFramework (INFO): Testing getblocktxn handler...
2024-05-28T18:19:13.847000Z TestFramework (INFO): Testing compactblock requests/announcements not at chain tip...
2024-05-28T18:19:14.109000Z TestFramework (INFO): Testing handling of low-work compact blocks...
2024-05-28T18:19:14.164000Z TestFramework (INFO): Testing handling of incorrect blocktxn responses...
2024-05-28T18:19:14.373000Z TestFramework (INFO): Testing end-to-end block relay...
2024-05-28T18:19:14.535000Z TestFramework (INFO): Testing handling of invalid compact blocks...
2024-05-28T18:19:15.391000Z TestFramework (INFO): Testing reconstructing compact blocks from all peers...
2024-05-28T18:19:15.497000Z TestFramework (ERROR): Assertion failed
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/p2p_compactblocks.py", line 926, in run_test
    self.test_compactblock_reconstruction_multiple_peers(
  File "/work/test/functional/p2p_compactblocks.py", line 826, in test_compactblock_reconstruction_multiple_peers
    assert tx.hash in mempool
AssertionError
2024-05-28T18:19:15.548000Z TestFramework (INFO): Stopping nodes
2024-05-28T18:19:15.900000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_181103/p2p_compactblocks_83
2024-05-28T18:19:15.900000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_181103/p2p_compactblocks_83/test_framework.log
2024-05-28T18:19:15.901000Z TestFramework (ERROR): 
2024-05-28T18:19:15.901000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-tsan/test/tmp/test_runner_₿₵_  _20240528_181103/p2p_compactblocks_83' to consolidate all logs
2024-05-28T18:19:15.901000Z TestFramework (ERROR): 
2024-05-28T18:19:15.901000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-05-28T18:19:15.901000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-05-28T18:19:15.901000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_compactblocks.py

This is rebased above the test fix, CI should be green now

This revision is now accepted and ready to land.Wed, May 29, 09:34

Tail of the build log:

chronik_lokad_id_group.py                  | ○ Skipped | 0 s
chronik_mempool_conflicts.py               | ○ Skipped | 0 s
chronik_pause.py                           | ○ Skipped | 0 s
chronik_plugins_setup.py                   | ○ Skipped | 0 s
chronik_raw_tx.py                          | ○ Skipped | 0 s
chronik_resync.py                          | ○ Skipped | 0 s
chronik_script_confirmed_txs.py            | ○ Skipped | 0 s
chronik_script_history.py                  | ○ Skipped | 0 s
chronik_script_unconfirmed_txs.py          | ○ Skipped | 0 s
chronik_script_utxos.py                    | ○ Skipped | 0 s
chronik_serve.py                           | ○ Skipped | 0 s
chronik_spent_by.py                        | ○ Skipped | 0 s
chronik_token_alp.py                       | ○ Skipped | 0 s
chronik_token_broadcast_txs.py             | ○ Skipped | 0 s
chronik_token_burn.py                      | ○ Skipped | 0 s
chronik_token_id_group.py                  | ○ Skipped | 0 s
chronik_token_parse_failure.py             | ○ Skipped | 0 s
chronik_token_script_group.py              | ○ Skipped | 0 s
chronik_token_slp_fungible.py              | ○ Skipped | 0 s
chronik_token_slp_mint_vault.py            | ○ Skipped | 0 s
chronik_token_slp_nft1.py                  | ○ Skipped | 0 s
chronik_tx.py                              | ○ Skipped | 0 s
chronik_tx_removal_order.py                | ○ Skipped | 0 s
chronik_ws.py                              | ○ Skipped | 0 s
chronik_ws_ordering.py                     | ○ Skipped | 0 s
chronik_ws_ping.py                         | ○ Skipped | 0 s
chronik_ws_script.py                       | ○ Skipped | 0 s
feature_bind_port_discover.py              | ○ Skipped | 0 s
feature_bind_port_externalip.py            | ○ Skipped | 0 s
interface_usdt_net.py                      | ○ Skipped | 0 s
interface_usdt_utxocache.py                | ○ Skipped | 0 s
interface_usdt_validation.py               | ○ Skipped | 0 s

ALL                                        | ✓ Passed  | 2766 s (accumulated) 
Runtime: 553 s

[200/499] Test Bitcoin RPC authentication...
...
----------------------------------------------------------------------
Ran 3 tests in 0.021s

OK
[201/499] cd /work/contrib/devtools/chainparams && /usr/bin/python3.9 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[218/499] Running seeder test suite
PASSED: seeder test suite
[274/499] bitcoin: testing net_tests
FAILED: src/test/CMakeFiles/check-bitcoin-net_tests 
cd /work/abc-ci-builds/build-tsan/src/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-tsan/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-tsan/test/log && /usr/bin/cmake -E env TSAN_OPTIONS=second_deadlock_stack=1:log_path=stdout TSAN_OPTIONS=suppressions=/work/test/sanitizer_suppressions/tsan:log_path=stdout /work/cmake/utils/log-and-print-on-failure.sh /work/abc-ci-builds/build-tsan/test/log/bitcoin-net_tests.log /work/abc-ci-builds/build-tsan/src/test/test_bitcoin --run_test=net_tests --logger=HRF,message:JUNIT,message,bitcoin-net_tests.xml --catch_system_errors=no
Running 19 test cases...
../../src/test/net_tests.cpp(1262): error: in "net_tests/net_group_limit": check connman->checkContiguousAddressesConnection( { {0, NODE_NETWORK | NODE_AVALANCHE, 50}, {1, NODE_NETWORK, 10}, {2, NODE_NETWORK, 10}, {3, NODE_NETWORK, 10}, {4, NODE_NETWORK, 10}, {5, NODE_NETWORK, 10}, {6, NODE_NETWORK, 10}, {7, NODE_NETWORK, 10}, {8, NODE_NETWORK, 10}, {9, NODE_NETWORK, 10}, {10, NODE_NETWORK, 10}, {11, NODE_NETWORK, 10}, }, options.m_max_outbound_full_relay, 50 ) has failed

*** 1 failure is detected in the test module "Bitcoin ABC unit tests"
[286/499] avalanche: testing voterecord_tests
ninja: build stopped: subcommand failed.
Build build-tsan failed with exit code 1