{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14995","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14995/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14995/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14995/events","html_url":"https://github.com/bitcoin/bitcoin/issues/14995","id":392180385,"node_id":"MDU6SXNzdWUzOTIxODAzODU=","number":14995,"title":"possible deadlock with walletpassphrase","user":{"login":"xuzhitong","id":18006914,"node_id":"MDQ6VXNlcjE4MDA2OTE0","avatar_url":"https://avatars3.githubusercontent.com/u/18006914?v=4","gravatar_id":"","url":"https://api.github.com/users/xuzhitong","html_url":"https://github.com/xuzhitong","followers_url":"https://api.github.com/users/xuzhitong/followers","following_url":"https://api.github.com/users/xuzhitong/following{/other_user}","gists_url":"https://api.github.com/users/xuzhitong/gists{/gist_id}","starred_url":"https://api.github.com/users/xuzhitong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuzhitong/subscriptions","organizations_url":"https://api.github.com/users/xuzhitong/orgs","repos_url":"https://api.github.com/users/xuzhitong/repos","events_url":"https://api.github.com/users/xuzhitong/events{/privacy}","received_events_url":"https://api.github.com/users/xuzhitong/received_events","type":"User","site_admin":false},"labels":[{"id":98279177,"node_id":"MDU6TGFiZWw5ODI3OTE3Nw==","url":"https://api.github.com/repos/bitcoin/bitcoin/labels/RPC/REST/ZMQ","name":"RPC/REST/ZMQ","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-12-18T14:26:46Z","updated_at":"2018-12-19T12:10:02Z","closed_at":null,"author_association":"NONE","body":"When i used the encrypted wallet to test transfer parallelly,i frequently got the trouble: The rpc server is not responding.My test script is like below:\r\n#!/bin/sh\r\nwhile [ 1 ]\r\ndo\r\n./bitcoin-cli listaddressgroupings>null\r\n./bitcoin-cli walletpassphrase \"!@#$%^&*\" 2\r\n./bitcoin sendtoaddress \"mhAW6mzs5DeCbzBUHXBi4U446Fdnr1z8U7\" 0.01\r\ndone\r\n\r\nWhen i open the dead lock trace macro and check the debug log,i found the last print is as below:\r\n2018-12-17 08:27:58 ThreadRPCServer method=walletpassphrase\r\n2018-12-17 08:27:58 LOCKCONTENTION: cs_main\r\n2018-12-17 08:27:58 Locker: wallet/rpcwallet.cpp:2642\r\n2018-12-17 08:27:58 LOCKCONTENTION: pWallet->cs_wallet\r\n2018-12-17 08:27:58 Locker: wallet/rpcwallet.cpp:2607\r\n\r\nThe line no 2642 is walletpassphrase and 2607 is LockWallet. I checked the code,i found there is no log printed for this line in function \"walletpassphrase\":\r\n\"LogPrint(BCLog::RPC, \"queue run of timer %s in %i seconds (using %s)\\n\", name, nSeconds, timerInterface->Name());\" So i guess the reason may be:\r\nWhen \"walletpassphrase\" is running and lock the cs_wallet,the last relock timer triggered and call \"LockWallet\".\"LockWallet\" want to lock the cs_wallet but it has been locked by \"walletpassphrase\",so \"LockWallet\" is blocked.When \"walletpassphrase\" run to call \"RPCRunLater\",the function will erase the timer from the std::map \"deadlineTimers\",but the timer's timeout call is blocked,so the dead lock take place.\r\nIs my guess right?\r\nHow to reslove the issue?\r\nAny help will be appreciative！"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/448572419","html_url":"https://github.com/bitcoin/bitcoin/issues/14995#issuecomment-448572419","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/14995","id":448572419,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODU3MjQxOQ==","user":{"login":"practicalswift","id":7826565,"node_id":"MDQ6VXNlcjc4MjY1NjU=","avatar_url":"https://avatars3.githubusercontent.com/u/7826565?v=4","gravatar_id":"","url":"https://api.github.com/users/practicalswift","html_url":"https://github.com/practicalswift","followers_url":"https://api.github.com/users/practicalswift/followers","following_url":"https://api.github.com/users/practicalswift/following{/other_user}","gists_url":"https://api.github.com/users/practicalswift/gists{/gist_id}","starred_url":"https://api.github.com/users/practicalswift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/practicalswift/subscriptions","organizations_url":"https://api.github.com/users/practicalswift/orgs","repos_url":"https://api.github.com/users/practicalswift/repos","events_url":"https://api.github.com/users/practicalswift/events{/privacy}","received_events_url":"https://api.github.com/users/practicalswift/received_events","type":"User","site_admin":false},"created_at":"2018-12-19T12:10:02Z","updated_at":"2018-12-19T12:10:02Z","author_association":"MEMBER","body":"@xuzhitong The probability that this has been fixed since 0.15.2 is quite high, so please try to reproduce against the current version. Thanks for reporting!"}}
{"actor":{"display_login":"practicalswift"}}