bitcoinknots / bitcoin

Bitcoin Knots enhanced Bitcoin node/wallet software
MIT License
200 stars 60 forks source link

error: "Disk space is low!", ignoring disk space limitations #8

Closed nikitasius closed 6 years ago

nikitasius commented 6 years ago

Describe the issue

Program ignore disk space limitation, what i set up on start

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. start bitcoin-0.14.2/bin/bitcoin-qt
  2. select checkbox what you want to limit data to 1024Mb (~6 days)
  3. bitcoin use all disk space (~16Gb in my case) and throws an error.

Expected behaviour

Program syncing a blockchain using only 1Gb of free space on my hdd

Actual behaviour

Even if i selected to limit disk space to 1024Mb, program used all available space. folder .bitcoin/blocks/have size of 16Gb.

What version of Bitcoin Knots are you using?

bitcoin-0.14.2.knots20170618-x86_64-linux-gnu.tar.gz

Machine specs:

Any extra information that might be useful in the debugging process.

2017-07-06 05:53:20 UpdateTip: new best=00000000000000006abd2d638e7b532a9b5938af1449666dead4694b630d2cfa height=278269 version=0x00000002 log2_work=75.356384 tx=30280869 date='2014-01-02 11:55:20' progress=0.128740 cache=318.1MiB(491213tx) 2017-07-06 05:53:20 UpdateTip: new best=00000000000000017bac9a8e85660ad348050c789922d5f8fe544d473368be1a height=278270 version=0x00000002 log2_work=75.356566 tx=30281382 date='2014-01-02 12:35:05' progress=0.128742 cache=318.2MiB(491336tx) 2017-07-06 05:53:20 Disk space is low! 2017-07-06 05:53:30 GUI: QXcbConnection: XCB error: 3 (BadWindow), sequence: 17135, resource id: 19042778, major code: 40 (TranslateCoords), minor code: 0 2017-07-06 05:53:30 ERROR: ProcessNewBlock: ActivateBestChain failed 2017-07-06 05:53:30 tor: Thread interrupt 2017-07-06 05:53:30 net thread exit 2017-07-06 05:53:30 torcontrol thread exit 2017-07-06 05:53:30 opencon thread exit 2017-07-06 05:53:30 addcon thread exit 2017-07-06 05:53:31 Disk space is low! 2017-07-06 05:53:31 scheduler thread interrupt 2017-07-06 05:53:31 Shutdown: In progress... 2017-07-06 05:53:32 GUI: QXcbConnection: XCB error: 3 (BadWindow), sequence: 17327, resource id: 19043178, major code: 40 (TranslateCoords), minor code: 0 2017-07-06 05:53:32 ERROR: ProcessNewBlock: ActivateBestChain failed 2017-07-06 05:53:32 msghand thread exit 2017-07-06 05:53:32 Dumped mempool: 3e-06s to copy, 0.085057s to dump 2017-07-06 05:53:32 *** Disk space is low! 2017-07-06 05:53:33 Shutdown: done

luke-jr commented 6 years ago

Does a bitcoin_rw.conf file exist? Can you post its contents?

nikitasius commented 6 years ago

Does a bitcoin_rw.conf file exist? Can you post its contents?

I wiped all (software, config, .bitcoin folder). I will try it again and i will tell you resultats.

nikitasius commented 6 years ago

Well..

error: http://i.imgur.com/BzvpCWr.png blocks folder: http://i.imgur.com/KVswpaQ.png before: /dev/sda2 717G 665G 16G 98% / after: /dev/sda2 717G 681G 51M 100% /

Settings on start: http://i.imgur.com/5NJUVfq.png

Thats how i start it: ~/patatipatata/0_btc/bitcoin-0.14.2/bin$ ./bitcoin-qt

patatipatata - ecryptfs folder.

There is no bitcoin_rw.conf file (not in .bitcoin folder and not in ~/.config/Bitcoin) there is only Bitcoin-Qt.conf file: Bitcoin-Qt.conf.txt

nikitasius commented 6 years ago

i got some free space and.. before /dev/sda2 717G 544G 137G 80% / after (not finished yet) /dev/sda2 717G 586G 95G 87% / Looks like this software really don't care about "use 1Gb or 4Gb and not more setting". screenshot - 07072017 - 07 48 09 am

nikitasius commented 6 years ago

well well well. idk what the fuck with this software screenshot - 09272017 - 09 14 01 pm

You select 2048 Mb, it continue and continue download. Damn i no need this 150 Gb of blockchains.

Since 7 jul no info -.-

luke-jr commented 6 years ago

Check ~/Library/Application Support/Bitcoin/

nikitasius commented 6 years ago

I dont have such folder

nikitas@pentagon:~/Downloads$ cd ~/Library/Application Support/Bitcoin/
bash: cd: /home/nikitas/Library/Application: No such file or directory

btw reached 5.1Gb screenshot - 09272017 - 09 35 17 pm

nikitasius commented 6 years ago

here is file what was running now https://bitcoinknots.org/files/0.15.x/0.15.0.knots20170914/bitcoin-0.15.0.knots20170914-x86_64-linux-gnu.tar.gz

luke-jr commented 6 years ago

Sorry, your theme made me think you were using Mac.

On Linux, the directory is ~/.bitcoin

There should be a bitcoin_rw.conf file in it...

nikitasius commented 6 years ago

well..

nikitas@pentagon:~$ ls ~/.bitcoin
ls: cannot access /home/nikitas/.bitcoin: No such file or directory
nikitas@pentagon:~$ ls ~/.config/Bitcoin/
Bitcoin-Qt.conf
nikitas@pentagon:~$ ls ~/patatipatata/0_btc/.bitcoin/
banlist.dat  chainstate  debug.log          mempool.dat  wallet.dat
blocks       db.log      fee_estimates.dat  peers.dat
nikitas@pentagon:~$ 
luke-jr commented 6 years ago

That's odd. Are you setting $HOME or -datadir when you run Bitcoin Knots? Why is it using ~/patatipatata/0_btc/ for the .bitcoin directory?

nikitasius commented 6 years ago

nope, i should?

clean run:

  1. i downloaded https://bitcoinknots.org/files/0.15.x/0.15.0.knots20170914/bitcoin-0.15.0.knots20170914-x86_64-linux-gnu.tar.gz
  2. i unpacked it into ~/patatipatata/0_btc/
  3. i open terminal in ~/patatipatata/0_btc/bitcoin-0.15.0/bin
  4. i run ./bitcoin-qt

next i setup as screenshot - 09282017 - 08 30 21 am

and some time after i have screenshot - 09282017 - 09 07 14 am

patatipatata - ecryptfs area.

nikitasius commented 6 years ago

still increasing screenshot - 09282017 - 09 14 55 am

luke-jr commented 6 years ago

Reproduced the bug, will fix soon.

luke-jr commented 6 years ago

Please confirm that it is fixed in http://luke.dashjr.org/programs/bitcoin/files/bitcoind/misc/0.15.x/tmp-942fcf8e60/

nikitasius commented 6 years ago

Looks fixed!

Before: https://github.com/bitcoinknots/bitcoin/issues/8#issuecomment-332626483

Now: screenshot - 09302017 - 08 39 29 pm

and here are settings: screenshot - 09302017 - 08 13 45 pm

I will let it download all. Great job. Finally i will be able to use bitcoin API <3

nikitasius commented 6 years ago

what finally you did? And why debian was affected?

luke-jr commented 6 years ago

Had to reorganize the code a bit. It was trying to set the prune value before it determined the datadir. So I made it wait to write it until later.

luke-jr commented 6 years ago

Final fix will be released in 0.15.1. Until then, the custom build is needed for the first-time run only - once it's set correctly, you can use the normal 0.15.0 release.