Page MenuHomePhabricator

Merge #12559: Avoid locking cs_main in some wallet RPC
ClosedPublic

Authored by nakihito on Mon, Jan 13, 20:51.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC24d55d31a9ff: Merge #12559: Avoid locking cs_main in some wallet RPC
Summary

00f58f8c48db05dce9dceed73a0028482e037f0f rpc: Avoid locking cs_main in some wallet RPC (João Barbosa)

Pull request description:

Avoid locking `cs_main` in the folllowing wallet RPC:
 - `decoderawtransaction`
 - `getnewaddress`
 - `getrawchangeaddress`
 - `setlabel`

Tree-SHA512: 54089766b2a969a17479af6c60e8ce151fac1f8cec268d43c61e679d5d17e76d17e414240c9ca2bfd280165f3a04e24a51310eb283591cd601a7eebc8b2423ea

Backport of Core PR12559
https://github.com/bitcoin/bitcoin/pull/12559/

Test Plan
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Mon, Jan 13, 20:51
Owners added a reviewer: Restricted Owners Package.Mon, Jan 13, 20:51
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Jan 13, 20:51

Snippet of first build failure:

[20:52:27] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git config core.sparseCheckout true
[20:52:27] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git config http.sslCAInfo
[20:52:27] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref refs/tags/phabricator/diff/15416
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git log -n1 --pretty=format:%H%x20%s b8896f3e907614f9740045e9e205fd314f7305e8 --
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git -c credential.helper= checkout -q -f phabricator/diff/15416
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git show-ref refs/tags/phabricator/diff/15416
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] Cleaning Bitcoin ABC Staging in /home/teamcity/buildAgent/work/c4a5708f2bae7929 the file set ALL_UNTRACKED
[20:52:28] :			 [Update checkout directory (/home/teamcity/buildAgent/work/c4a5708f2bae7929)] /usr/bin/git clean -f -d -x
[20:52:28] : Build preparation done
[20:52:28]E: Step 1/1: Command Line
[20:52:28] :	 [Step 1/1] Ant JUnit report watcher
[20:52:28] :		 [Ant JUnit report watcher] Watching paths:
[20:52:28] :		 [Ant JUnit report watcher] +:build/test_bitcoin.xml
[20:52:28] :		 [Ant JUnit report watcher] +:test/functional/junit_results.xml
[20:52:28] :		 [Ant JUnit report watcher] +:build/junit_results*.xml
[20:52:28] :	 [Step 1/1] Starting: /home/teamcity/buildAgent/temp/agentTmp/custom_script8254406668639538475
[20:52:28] :	 [Step 1/1] in directory: /home/teamcity/buildAgent/work/c4a5708f2bae7929
[20:52:28]W:	 [Step 1/1] + : build-diff
[20:52:28] :	 [Step 1/1] Running build configuration 'build-diff'...
[20:52:28]W:	 [Step 1/1] + '[' -z build-diff ']'
[20:52:28]W:	 [Step 1/1] + echo 'Running build configuration '\''build-diff'\''...'
[20:52:28]W:	 [Step 1/1] ++ git rev-parse --show-toplevel
[20:52:28]W:	 [Step 1/1] + TOPLEVEL=/home/teamcity/buildAgent/work/c4a5708f2bae7929
[20:52:28]W:	 [Step 1/1] + export TOPLEVEL
[20:52:28]W:	 [Step 1/1] + trap print_sanitizers_log ERR
[20:52:28]W:	 [Step 1/1] +++ dirname ./contrib/teamcity/build-configurations.sh
[20:52:28]W:	 [Step 1/1] ++ cd ./contrib/teamcity
[20:52:28]W:	 [Step 1/1] ++ pwd
[20:52:28]W:	 [Step 1/1] + CI_SCRIPTS_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/contrib/teamcity
[20:52:28]W:	 [Step 1/1] + setup
[20:52:28]W:	 [Step 1/1] + : /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[20:52:28]W:	 [Step 1/1] + mkdir -p /home/teamcity/buildAgent/work/c4a5708f2bae7929/build/output
[20:52:28]W:	 [Step 1/1] ++ cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[20:52:28]W:	 [Step 1/1] ++ pwd
[20:52:28]W:	 [Step 1/1] + BUILD_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[20:52:28]W:	 [Step 1/1] + export BUILD_DIR
[20:52:28]W:	 [Step 1/1] + TEST_RUNNER_FLAGS=--tmpdirprefix=output
[20:52:28]W:	 [Step 1/1] + cd /home/teamcity/buildAgent/work/c4a5708f2bae7929/build
[20:52:28]W:	 [Step 1/1] ++ nproc
[20:52:28]W:	 [Step 1/1] + THREADS=12
[20:52:28]W:	 [Step 1/1] + export THREADS
[20:52:28]W:	 [Step 1/1] + SAN_SUPP_DIR=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions
[20:52:28]W:	 [Step 1/1] + SAN_LOG_DIR=/tmp/sanitizer_logs
[20:52:28]W:	 [Step 1/1] + mkdir -p /tmp/sanitizer_logs
[20:52:28]W:	 [Step 1/1] + rm -rf '/tmp/sanitizer_logs/*'
[20:52:28]W:	 [Step 1/1] + export ASAN_OPTIONS=malloc_context_size=0:log_path=/tmp/sanitizer_logs/asan.log
[20:52:28]W:	 [Step 1/1] + ASAN_OPTIONS=malloc_context_size=0:log_path=/tmp/sanitizer_logs/asan.log
[20:52:28] :	 [Step 1/1] Error: Invalid build name 'build-diff'
[20:52:28]W:	 [Step 1/1] + export LSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/lsan:log_path=/tmp/sanitizer_logs/lsan.log
[20:52:28]W:	 [Step 1/1] + LSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/lsan:log_path=/tmp/sanitizer_logs/lsan.log
[20:52:28]W:	 [Step 1/1] + export TSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/tsan:log_path=/tmp/sanitizer_logs/tsan.log
[20:52:28]W:	 [Step 1/1] + TSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/tsan:log_path=/tmp/sanitizer_logs/tsan.log
[20:52:28]W:	 [Step 1/1] + export UBSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:log_path=/tmp/sanitizer_logs/ubsan.log
[20:52:28]W:	 [Step 1/1] + UBSAN_OPTIONS=suppressions=/home/teamcity/buildAgent/work/c4a5708f2bae7929/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:log_path=/tmp/sanitizer_logs/ubsan.log
[20:52:28]W:	 [Step 1/1] + case "$ABC_BUILD_NAME" in
[20:52:28]W:	 [Step 1/1] + echo 'Error: Invalid build name '\''build-diff'\'''
[20:52:28]W:	 [Step 1/1] + exit 2
[20:52:28]W:	 [Step 1/1] Process exited with code 2
[20:52:28]E:	 [Step 1/1] Process exited with code 2 (Step: Command Line)
nakihito planned changes to this revision.Mon, Jan 13, 21:03
nakihito updated this revision to Diff 15417.Mon, Jan 13, 21:04

Rebased.

nakihito planned changes to this revision.Mon, Jan 13, 21:04
nakihito requested review of this revision.Mon, Jan 13, 22:24
deadalnix accepted this revision.Mon, Jan 13, 23:06
This revision is now accepted and ready to land.Mon, Jan 13, 23:06