Page MenuHomePhabricator

Merge #14108: tests: Add missing locking annotations and locks (g_cs_orphans)
ClosedPublic

Authored by nakihito on Jan 16 2020, 23:09.

Details

Summary

b602c9b3af tests: Add missing locking annotations and locks (practicalswift)

Pull request description:

Add missing locking annotations and locks.

`mapOrphanTransactions` is guarded by `g_cs_orphans`.

Tree-SHA512: f95104fbef23bd385e754c6bea3c3bdddd8a9c6a68e719d761227c9be1e46ff1316ec050a15a1243218dbab4e8584da6674f4a72f949f54b0a758392f19c83f8

Backport of Core PR14108
https://github.com/bitcoin/bitcoin/pull/14108/

Test Plan
cmake -GNinja .. -DENABLE_WERROR=ON
ninja check

Also run build-werror and build-tsan builds.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR14108
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8989
Build 15940: Default Diff Build & Tests
Build 15939: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jan 16 2020, 23:09
jasonbcox requested changes to this revision.Jan 16 2020, 23:26

test plan needs TSAN not Werror

This revision now requires changes to proceed.Jan 16 2020, 23:26

Snippet of first build failure:

[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_encryption.py                    | ✓ Passed  | 8 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_groups.py                        | ✓ Passed  | 38 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_hd.py                            | ✓ Passed  | 13 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_import_rescan.py                 | ✓ Passed  | 16 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_importmulti.py                   | ✓ Passed  | 10 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_importprunedfunds.py             | ✓ Passed  | 2 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_keypool.py                       | ✓ Passed  | 5 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_keypool_topup.py                 | ✓ Passed  | 7 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_labels.py                        | ✓ Passed  | 13 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_listreceivedby.py                | ✓ Passed  | 20 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_listsinceblock.py                | ✓ Passed  | 7 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_listtransactions.py              | ✓ Passed  | 12 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py                   | ✓ Passed  | 26 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_multiwallet.py --usecli          | ✓ Passed  | 28 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_resendwallettransactions.py      | ✓ Passed  | 2 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py                     | ✓ Passed  | 4 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_txn_clone.py --mineblock         | ✓ Passed  | 5 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py               | ✓ Passed  | 4 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_txn_doublespend.py --mineblock   | ✓ Passed  | 5 s
[23:49:24] :	 [Step 1/1]  [0m [0;34mwallet_zapwallettxes.py                 | ✓ Passed  | 8 s
[23:49:24] :	 [Step 1/1]  [0m [1m
[23:49:24] :	 [Step 1/1] ALL                                     | ✓ Passed  | 1746 s (accumulated) 
[23:49:24] :	 [Step 1/1]  [0mRuntime: 902 s
[23:49:24] :	 [Step 1/1] 
[23:49:24] :	 [Step 1/1] [7/246] Test Bitcoin RPC authentication...
[23:49:24] :	 [Step 1/1] ...
[23:49:24] :	 [Step 1/1] ----------------------------------------------------------------------
[23:49:24] :	 [Step 1/1] Ran 3 tests in 0.003s
[23:49:24] :	 [Step 1/1] 
[23:49:24] :	 [Step 1/1] OK
[23:49:24] :	 [Step 1/1] [11/244] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/contrib/devtools/chainparams && /usr/bin/python3 ./test_make_chainparams.py
[23:49:24] :	 [Step 1/1] .....
[23:49:24] :	 [Step 1/1] ----------------------------------------------------------------------
[23:49:24] :	 [Step 1/1] Ran 5 tests in 0.001s
[23:49:24] :	 [Step 1/1] 
[23:49:24] :	 [Step 1/1] OK
[23:49:24] :	 [Step 1/1] [108/244] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/uint256_tests.cpp.o
[23:49:24] :	 [Step 1/1] ../src/test/uint256_tests.cpp:287:7: warning: explicitly assigning value of variable of type 'arith_uint256' to itself [-Wself-assign-overloaded]
[23:49:24] :	 [Step 1/1]     v /= v;
[23:49:24] :	 [Step 1/1]     ~ ^  ~
[23:49:24] :	 [Step 1/1] ../src/test/uint256_tests.cpp:291:7: warning: explicitly assigning value of variable of type 'arith_uint256' to itself [-Wself-assign-overloaded]
[23:49:24] :	 [Step 1/1]     v -= v;
[23:49:24] :	 [Step 1/1]     ~ ^  ~
[23:49:24] :	 [Step 1/1] 2 warnings generated.
[23:49:24] :	 [Step 1/1] [124/244] Running bitcoin-seeder test suite
[23:49:24] :	 [Step 1/1] PASSED: bitcoin-seeder test suite
[23:49:24] :	 [Step 1/1] [211/244] bitcoin: testing radix_tests
[23:49:24] :	 [Step 1/1] FAILED: src/test/CMakeFiles/check-bitcoin-radix_tests 
[23:49:24] :	 [Step 1/1] cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/src/test && /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/src/test/run-radix_tests.sh
[23:49:24] :	 [Step 1/1] [215/244] bitcoin: testing transaction_tests
[23:49:24] :	 [Step 1/1] ninja: build stopped: subcommand failed.
[23:49:24]W:	 [Step 1/1] ++ print_sanitizers_log
[23:49:24]W:	 [Step 1/1] ++ for log in "${SAN_LOG_DIR}"/*.log.*
[23:49:24]W:	 [Step 1/1] ++ echo '*** Output of /tmp/sanitizer_logs/ubsan.log.1281 ***'
[23:49:24]W:	 [Step 1/1] ++ cat /tmp/sanitizer_logs/ubsan.log.1281
[23:49:24] :	 [Step 1/1] *** Output of /tmp/sanitizer_logs/ubsan.log.1281 ***
[23:49:24] :	 [Step 1/1] ==1281==ERROR: ThreadSanitizer failed to allocate 0x80000 (524288) bytes of clock allocator (error code: 12)
[23:49:24] :	 [Step 1/1] ERROR: Failed to mmap
[23:49:24]W:	 [Step 1/1] Process exited with code 1
[23:49:24]E:	 [Step 1/1] Process exited with code 1 (Step: Command Line)

For posterity: the failed run was on the wrong build agent and should be ignored. The resource intensive build passed as expected.

This revision is now accepted and ready to land.Jan 17 2020, 18:38