HomePhabricator

Merge #18487: rpc: Fix rpcRunLater race in walletpassphrase

Description

Merge #18487: rpc: Fix rpcRunLater race in walletpassphrase

Summary:
7b8e15728d1ad058a4b7d7569fd5d5ba6806ca28 rpc: Fix rpcRunLater race in walletpassphrase (João Barbosa)

Pull request description:

Release locks before calling `rpcRunLater`.

Quick explanation: `rpcRunLater` leads to `event_free` which calls `event_del` which can wait for the event callback to finish if it's already running and that callback will try to lock wallet mutex - which is already locked in http thread.

Fixes #14995 , fixes #18482. Best reviewed with whitespace changes hidden.

Backport of Core PR18487
Fixes https://github.com/Bitcoin-ABC/bitcoin-abc/issues/375

Test Plan: ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7908

Details

Provenance
Wladimir J. van der Laan <laanwj@protonmail.com>Authored on Oct 13 2020, 21:22
jasonbcoxCommitted on Oct 13 2020, 21:22
abc-botPushed on Oct 13 2020, 21:26
Reviewer
Restricted Project
Differential Revision
D7908: Merge #18487: rpc: Fix rpcRunLater race in walletpassphrase
Parents
rABC6c6a2852b03b: [DOC] Update gitian instructions with the new OSX SDK version
Branches
Unknown
Tags
Unknown