Bitcoin Forum
May 06, 2024, 09:56:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind 0.12 pruned locks file system  (Read 1278 times)
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 06, 2016, 08:02:34 AM
Last edit: April 06, 2016, 01:26:11 PM by rupy
 #1

I'm trying to run bitcoind pruned, the blockchain sync worked fine, and also once the sync was done bitcoind was running smoothly.

But then after a reboot, when I start bitcoind it boots up ok and does it's thing verifying some stuff but then it blocks 3 cores at 100% io-wait and the disk is frozen (if I try to cat any file bitcoind is holding the cat process freezes) and I can't kill bitcoind?!

Is anyone actually using pruned?

How should pruned be used? What is prune=<n>? MB of what, how, where?

I'm trying to reindex and run unpruned to see if pruned is the problem. Just have to wait 4 days!

So bitcoind goes from taking 3 cores to 100% io-wait and locking these files:

Code:
COMMAND           PID  TYPE SIZE MODE  M START END PATH
cron              653 FLOCK   0B WRITE 0     0   0 /run
whoopsie          640 FLOCK   0B WRITE 0     0   0 /run/lock
master            864 FLOCK   0B WRITE 0     0   0 /
master            864 FLOCK   0B WRITE 0     0   0 /
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd/bitcoin/.lock
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd/bitcoin/blocks/index/LOCK
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd/bitcoin/chainstate/LOCK

to having only 1-2 cores 100% io-wait and locking this when I try kill -9:

Code:
COMMAND           PID  TYPE SIZE MODE  M START END PATH
cron              653 FLOCK   0B WRITE 0     0   0 /run
whoopsie          640 FLOCK   0B WRITE 0     0   0 /run/lock
master            864 FLOCK   0B WRITE 0     0   0 /
master            864 FLOCK   0B WRITE 0     0   0 /
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd
bitcoind         2014 POSIX   0B WRITE 0     0   0 /mnt/ssd

BANKBOOK GWT Wallet & no-FIAT Billing API
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715032603
Hero Member
*
Offline Offline

Posts: 1715032603

View Profile Personal Message (Offline)

Ignore
1715032603
Reply with quote  #2

1715032603
Report to moderator
1715032603
Hero Member
*
Offline Offline

Posts: 1715032603

View Profile Personal Message (Offline)

Ignore
1715032603
Reply with quote  #2

1715032603
Report to moderator
1715032603
Hero Member
*
Offline Offline

Posts: 1715032603

View Profile Personal Message (Offline)

Ignore
1715032603
Reply with quote  #2

1715032603
Report to moderator
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 09, 2016, 07:58:00 AM
Last edit: April 09, 2016, 08:09:15 AM by rupy
 #2

Ok, pruned is broken on 0.12. Nobody cares?... well when the blockchain reaches 100GB and can't fit on my SSD I'll throw a hissyfit like Mike Hern! Wink

To reproduce launch a new bitcoind with -prune=600 and let it sync, then reboot the machine and the bitcoind will lockup disk and the bitcoind process while verifying the block headers.

It will take you 4 days to reproduce every time, enjoy!

I'll copy the blockchain and prune it from this state to see if it works then... maybe this bug is due to the "prune from scratch" premise?

How do you debug a process that freezes linux like that?!

BANKBOOK GWT Wallet & no-FIAT Billing API
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
April 09, 2016, 01:49:01 PM
 #3

Can you post the debug log?

cr1776
Legendary
*
Offline Offline

Activity: 4032
Merit: 1299


View Profile
April 09, 2016, 04:47:19 PM
 #4

...

How do you debug a process that freezes linux like that?!

What distro? Version? Locally hosted? Etc
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 09, 2016, 08:33:16 PM
 #5

@knightdk There was nothing in the debug.log at the failure time I checked.
@cr1776 Ubuntu 15.10, locally hosted? I guess yes!

BANKBOOK GWT Wallet & no-FIAT Billing API
HackerBOSS
Full Member
***
Offline Offline

Activity: 224
Merit: 101


View Profile
April 15, 2016, 01:45:39 AM
 #6

@knightdk There was nothing in the debug.log at the failure time I checked.
@cr1776 Ubuntu 15.10, locally hosted? I guess yes!

use ubuntu 14.04 because 15 not recommend

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6587


Just writing some code


View Profile WWW
April 15, 2016, 02:07:51 AM
 #7

@knightdk There was nothing in the debug.log at the failure time I checked.
@cr1776 Ubuntu 15.10, locally hosted? I guess yes!

use ubuntu 14.04 because 15 not recommend
Says who?

@knightdk There was nothing in the debug.log at the failure time I checked.
@cr1776 Ubuntu 15.10, locally hosted? I guess yes!
I'm using 15.10 as well and I cannot reproduce this. Can you provide specific steps for getting this problem? Also what are the specs of your system?

-ck
Legendary
*
Offline Offline

Activity: 4102
Merit: 1632


Ruu \o/


View Profile WWW
April 16, 2016, 05:59:09 AM
 #8

Just a thought; you're using an SSD. Are you using discard on the mount options, if supported by your distribution? If not, are you using trim on the file system at regular intervals?

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
April 16, 2016, 12:16:51 PM
Last edit: April 16, 2016, 12:30:26 PM by rupy
 #9

Ok, seems it works fine if you start the bitcoind normally (= it downloads the whole chain on disk) and then enable pruning.

Might be the amount of pruning that solved it, I used -prune=650 first time around, now I used -prune=10000.

Seems to run fine... better hurry and boot/prune those bitcoinds before the chain grows beyond cheap SSD size! Wink

Just a thought; you're using an SSD. Are you using discard on the mount options, if supported by your distribution? If not, are you using trim on the file system at regular intervals?

Ok, yes it's a SSD, but it wasn't slow; it was frozen!

And if linux doesn't handle SSDs properly by default on recent versions I don't know what to say...

It is connected via a USB3 -> SATA adapter though, maybe that's the problem?

Code:
/dev/sda on /mnt/ssd type ext4 (rw,relatime,data=ordered)

What is the syntax for discard?

Code:
mount -o discard /dev/sda /mnt/ssd

BANKBOOK GWT Wallet & no-FIAT Billing API
rupy (OP)
Hero Member
*****
Offline Offline

Activity: 725
Merit: 500



View Profile
May 10, 2016, 09:43:52 PM
Last edit: May 10, 2016, 11:24:42 PM by rupy
 #10

So this might be related to the USB3 - SATA - SSD dongle I'm using...

When I reboot the computer any command that tries to access the SSD freezes the SSH terminal.

But if I pull the USB3 plug and push it back in everything works fine!?!

Any clues?!

Is there a command to reset the USB3 ports without manually reconnecting them?

echo 0 > /sys/bus/usb/drivers/usb/X-X.X/authorized also freezes the prompt!

Ok, seems to be something bad with the USB3 - SATA stuff:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9c54caa456dccba938005f6479892b589975e6a

But the most recent kernel is 3.10 for my hardware... how could I apply a fix without recompiling the kernel?

Found this fix, but I'm missing mkinitcpio!?

https://bbs.archlinux.org/viewtopic.php?pid=1428782#p1428782

BANKBOOK GWT Wallet & no-FIAT Billing API
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!