-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
Bitcoind crashes when -datadir directory doesn't exist #1950
Comments
Note: The command line for launching bitcoind should not have RPC commands such as getinfo included, those should be issued by a second instance of bitcoind to issue rpcconnect commands. e.g.: Behavior with Bitcoin 0.7.0 PPA on Kubuntu 12.04 (with no extra "getinfo"; can't test with "getinfo" right now) and Bitcoin 0.7.1 on Win7 x64 (with or without extra "getinfo"): no crash, just the directory does not exist error. |
Fyi: Providing -datadir with rpc commands is fine if you have multiple |
About the RPC command: yes it's unnecessary for reproducing the bug, but I just happened to run it that way ;-) |
@tucenaber Can you please try current master again, there was a fix merged related to the Shutdown() function. |
It works as expected. Close it. |
…tion primitive 9d2dc93 Consensus: Minimal way to move dust out of consensus (furszy) Pull request description: Move only, moving `GetDustThreshold` and `isDust` from the transaction primitive class to policy.cpp. Coming from 330bb5a ACKs for top commit: random-zebra: ACK 9d2dc93 and merging... Tree-SHA512: 28f457771bb7b82fe5292fd6d39269388076d77c1b85103eb563e4ca0cbaf6d16f44d6c27a1e88a1e8915e1eaeaac6f5feffc423b9debf36e57429de97c75848
874096e [MOVEONLY] Move CFeeRate out of the consensus module (random-zebra) Pull request description: After bitcoin#1950, this PR completes the backport of bitcoin#9279 to move CFeeRate out of libconsensus. > CTxOut and CTransaction shouldn't depend on CFeeRate, which is something for policy checks and not consensus checks. ACKs for top commit: furszy: all good now, utACK 874096e Fuzzbawls: utACK 874096e Tree-SHA512: e5c33d7e26003a1c4acb5159c24be5ac0209fe9875b7b7d430cd8927c2174ea4727a8728a065dcf0bf8be4389b8f90fdfab227face458c014cf409385a106baa
Version 0.7.99 (#16eec89) on Linux
$ ./bitcoind -datadir=/blabla getinfo
Error: Specified directory does not exist
Segmentation fault
Edit to include gdb log;
$ gdb --args ./bitcoind -datadir="/non-existent" getinfo
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/tucenaber/src/git/bitcoin/src/bitcoind...done.
(gdb) run
Starting program: /home/tucenaber/src/git/bitcoin/src/bitcoind -datadir=/non-existent getinfo
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Error: Specified directory does not exist
Program received signal SIGSEGV, Segmentation fault.
CCoinsViewCache::Flush (this=0x0) at main.cpp:246
246 bool fOk = base->BatchWrite(cacheCoins, pindexTip);
(gdb) backtrace
#0 CCoinsViewCache::Flush (this=0x0) at main.cpp:246
#1 0x0000000000446cf1 in Shutdown (parg=parg@entry=0x0) at init.cpp:81
#2 0x0000000000451006 in AppInit (argc=argc@entry=3, argv=argv@entry=0x7fffffffe8d8) at init.cpp:141
#3 0x000000000041bc1a in main (argc=3, argv=0x7fffffffe8d8) at init.cpp:192
The text was updated successfully, but these errors were encountered: