-
Notifications
You must be signed in to change notification settings - Fork 35.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: Fix gui shutdown when waitfor* cmds are called from RPC console #18452
Conversation
While the Travis-to-GitHub connection is broken, here is Travis' build of this PR. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. Have you considered doing this in BitcoinApplication::requestShutdown
or even between app.exec()
and app.requestShutdown()
in qt/bitcoin.cpp?
Yes, I have. Line 316 in 5f9cd62
What are benefits of such approach while it requires to add Also, please note, that #17659 suggests to streamline the |
Concept ACK |
29f5e02
to
368530d
Compare
Updated 29f5e02 -> 368530d (pr18452.01 -> pr18452.02, diff):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 368530d, the approach looks better.
368530d
to
59b55cc
Compare
Updated 368530d -> 59b55cc (pr18452.02 -> pr18452.03, diff):
|
Tested ACK 59b55cc. |
src/rpc/server.cpp
Outdated
if (g_rpc_stopped) return; | ||
LogPrint(BCLog::RPC, "Stopping RPC\n"); | ||
deadlineTimers.clear(); | ||
DeleteAuthCookie(); | ||
g_rpc_stopped = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Race?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
59b55cc
to
2d7b6bc
Compare
Updated 59b55cc -> 2d7b6bc (pr18452.03 -> pr18452.04, diff):
|
Rebased 2d7b6bc -> da73f15 (pr18452.04 -> pr18452.05) due to the conflict with #18814. |
utACK da73f15 |
…rom RPC console da73f15 qt: Fix shutdown when waitfor* cmds are called from RPC console (Hennadii Stepanov) Pull request description: On master (7eed413), if the GUI has been started with`-server=1`, `bitcoin-qt` hangs on shutdown during calling any of the `waitfor*` commands in the GUI RPC console. This PR suggests minimal changes to fix this bug. Fix bitcoin#17495 ACKs for top commit: jonasschnelli: utACK da73f15 Tree-SHA512: 469f5332945a5f2c57d19336cda5df79b123ccc494aea6d58a85eb1293be52708b2b9c5bb6bc2c402a90b7b4e9e8d7ab8fe84cf201cf7ce612c9290c57e43681
Github-Pull: bitcoin#18452 Rebased-From: da73f15
Summary: This is a backport of [[bitcoin/bitcoin#18452 | core#18452]] Test Plan: `bitcoin-qt -server=1` In the RPC console, type `waitforblockheight XXXXXX` with XXXXXXX a future block height, then close the application. Make sure it does not hang. Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9260
On master (7eed413), if the GUI has been started with
-server=1
,bitcoin-qt
hangs on shutdown during calling any of thewaitfor*
commands in the GUI RPC console.This PR suggests minimal changes to fix this bug.
Fix #17495