Skip to content

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Nov 12, 2011

This leads to the bitcoin core being shut down while the UI is accessing it, and generally results in a segmentation fault or crash. In case it is desirable to make it possible to shutdown the GUI from its RPC server, we'll need to implement a signal for it. For the mean time, this is a safe stopgap.

Reproducing the bug:

bitcoin-qt -testnet -server -datadir=<new directory>

Output:

Warning: To use the "-server" option, you must set rpcpassword=<password>
in the configuration file: /tmp/test/testnet/bitcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
Segmentation fault

Also changes the Warning to an Error (as it is kind of fatal, terminating the rpc thread).

This leads to the bitcoin core being shut down while the UI is accessing it, and generally results in a segmentation fault or crash. In case it is desirable to make it possible to shutdown the GUI from its RPC server, we'll need to implement a signal for it. For the mean time, this is a safe stopgap.
// Shutdown will take long enough that the response should get back
CreateThread(Shutdown, NULL);
return "bitcoin server stopping";
#else
throw runtime_error("NYI: cannot shut down GUI with RPC command");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the acronym "NYI" -- Nubile Young Icelanders ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not Yet Implemented

gavinandresen added a commit that referenced this pull request Nov 14, 2011
RPC: do not launch Shutdown in a new thread in case we are running the UI
@gavinandresen gavinandresen merged commit 88a1b89 into bitcoin:master Nov 14, 2011
coblee referenced this pull request in litecoin-project/litecoin Jul 17, 2012
RPC: do not launch Shutdown in a new thread in case we are running the UI
ptschip pushed a commit to ptschip/bitcoin that referenced this pull request Jun 15, 2017
Small typo in allowed args for orphanpoolexpiry
fjahr pushed a commit to fjahr/bitcoin that referenced this pull request Jul 24, 2019
ee9e68c Add a descriptive comment for secp256k1_ecmult_const. (Gregory Maxwell)

Pull request description:

  Helps issue bitcoin#633

ACKs for commit ee9e68:

Tree-SHA512: 552bebbd99bf8e8225ef6028e6a3bd188d412977d9c6caa90515041622accd2ea43e320217bf097180343921e967f4627a76c73e4529097bca50be414503e63b
rajarshimaitra pushed a commit to rajarshimaitra/bitcoin that referenced this pull request Aug 5, 2021
Bump Bitcoin Core to latest version
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants