Qt: Fix for bitcoin-qt becoming unresponsive during shutdown (issue #13217)#13674
Qt: Fix for bitcoin-qt becoming unresponsive during shutdown (issue #13217)#13674LeandroRocha84 wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
There's also the possibility of emitting the shutdown signal from RPCExecutor destructor so we don't need a wrapper - that simplify the solution. I created the PR with the wrapper solution because it might be considered unsafe to emit signals from a destructor in a multi-threaded application. Would appreciate any input on this and I'll update the PR accordingly. |
promag
left a comment
There was a problem hiding this comment.
Indeed looks like unnecessary complexity. IIUC the main even loop blocks when joining the executor thread, so consider a different approach instead?
QEventLoop loop;
connect(&thread, SIGNAL(finished()), &loop, SLOT(quit()));
if (!thread.isFinished()) loop.exec();7ebd837 to
3844ba3
Compare
|
Thanks for the suggestion @promag |
3844ba3 to
086d88e
Compare
086d88e to
9255963
Compare
|
Hi all, please let me know if there's anything that needs to be done to have this fix merged. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
tACK 18850903f803bba58d110d3994df18969992f383 (on Linux) |
1885090 to
abff369
Compare
|
All comments addressed. Commits squashed. Please let me know if there's anything. |
|
re-tACK abff36969da9998e36c72f2df7faf68564f0c8db (Linux, macOS 10.13.6) |
|
@LeandroRocha84 sorry for keeping this up so long... |
|
Thanks @jonasschnelli I'm working on solving the conflicts after the rebase. Adding @promag as he might have some insight. |
59ebf17 to
a302c99
Compare
|
Conflicts resolved, rebase completed. I've tested the fix on linux. |
a302c99 to
ba230e4
Compare
937e77a to
c42788e
Compare
c42788e to
0636f38
Compare
| Needs rebase |
| There hasn't been much activity lately and the patch still needs rebase, so I am closing this for now. Please let me know when you want to continue working on this, so the pull request can be re-opened. |
This pull request contains a fix for the issue #13217, where bitcoin-qt becomes unresponsive during shutdown after a long running call (like gettxoutsetinfo) in the QT console.
The problem occurs because, during shutdown, waiting for the RPCExecutor thread to finish happens in the main thread.