gettxoutsetinfo returns empty dict on Raspberry Pi 2 #7344

issue photis openend this issue on January 14, 2016
  1. photis commented at 5:18 pm on January 14, 2016: none

    It takes from 5 (shortest) to almost 40 (longest) minutes for bitcoin-cli gettxoutsetinfo to return an empty dict. I noticed this first whilst configuring the Statoshi branch of Bitcoin Core, but went back to install Bitcoin Core (git clone -b v0.11.2 https://github.com/bitcoin/bitcoin.git) to find the same results.

     020:10 pi@raspinode:~/bin/bitcoin.orig $ bitcoin-cli gettxoutsetinfo
     1{
     2}
     320:12 pi@raspinode:~/bin/bitcoin.orig $ bitcoin-cli getinfo
     4{
     5    "version" : 110200,
     6    "protocolversion" : 70002,
     7    "blocks" : 393193,
     8    "timeoffset" : 0,
     9    "connections" : 12,
    10    "proxy" : "",
    11    "difficulty" : 113354299801.47113037,
    12    "testnet" : false,
    13    "relayfee" : 0.00005000,
    14    "errors" : ""
    15}
    1620:17 pi@raspinode:~/bin/bitcoin.orig $
    

    Raspberry Pi 2 - 1GB memory - 4 core CPU 900MHz - Blockchain on SanDisk Ultra Android microSDXC 128GB up to 80 MB/Sec Class 10

    All other RPC calls through bitcoin-cli are answered promptly and correctly. See also issue on jlopp/statoshi https://github.com/jlopp/statoshi/issues/19#issuecomment-171350739

  2. unsystemizer commented at 2:05 pm on January 16, 2016: contributor

    Same bitcoin version, same h/w, ran 4 times, the first time I didn’t measure, but the other three were all 7 mins. Don’t see a problem.

     0$ bitcoin-cli getinfo
     1{
     2    "version" : 110200,
     3    "protocolversion" : 70002,
     4    "walletversion" : 60000,
     5    "balance" : 0.00000000,
     6    "blocks" : 393556,
     7    "timeoffset" : -3,
     8    "connections" : 4,
     9    "proxy" : "",
    10    "difficulty" : 113354299801.47113037,
    11    "testnet" : false,
    12    "keypoololdest" : 1446923210,
    13    "keypoolsize" : 101,
    14    "paytxfee" : 0.00000000,
    15    "relayfee" : 0.00005000,
    16    "errors" : "WARNING: check your network connection, 5 blocks received in the last 4 hours (24 expected)"
    17}
    18
    19$ time bitcoin-cli gettxoutsetinfo; time bitcoin-cli gettxoutsetinfo;time bitcoin-cli gettxoutsetinfo;
    20{
    21    "height" : 393552,
    22    "bestblock" : "000000000000000008b1f531b928c1d27d61581d49f672de1b67d1c15330e2b8",
    23    "transactions" : 8491980,
    24    "txouts" : 33700542,
    25    "bytes_serialized" : 1142479068,
    26    "hash_serialized" : "6e9f737f9b893f06ce833e609407082c9ca0d35b6ce3d68cf8332df25fb0930c",
    27    "total_amount" : 15088661.13371732
    28}
    29
    30real    7m21.845s
    31user    0m0.030s
    32sys     0m0.020s
    33{
    34    "height" : 393552,
    35    "bestblock" : "000000000000000008b1f531b928c1d27d61581d49f672de1b67d1c15330e2b8",
    36    "transactions" : 8491980,
    37    "txouts" : 33700542,
    38    "bytes_serialized" : 1142479068,
    39    "hash_serialized" : "6e9f737f9b893f06ce833e609407082c9ca0d35b6ce3d68cf8332df25fb0930c",
    40    "total_amount" : 15088661.13371732
    41}
    42
    43real    7m20.363s
    44user    0m0.050s
    45sys     0m0.010s
    46{
    47    "height" : 393552,
    48    "bestblock" : "000000000000000008b1f531b928c1d27d61581d49f672de1b67d1c15330e2b8",
    49    "transactions" : 8491980,
    50    "txouts" : 33700542,
    51    "bytes_serialized" : 1142479068,
    52    "hash_serialized" : "6e9f737f9b893f06ce833e609407082c9ca0d35b6ce3d68cf8332df25fb0930c",
    53    "total_amount" : 15088661.13371732
    54}
    55
    56real    7m23.635s
    57user    0m0.030s
    58sys     0m0.020s
    

    I tried 6 more times and it never took more than 7m48s.

  3. photis commented at 4:33 pm on January 16, 2016: none
    Interesting. Thanks for taking the trouble. I tried 3 more times your way and got times between 9m56s and 12m34s. Each time with an empty dict as result. The only difference I can see is that my version is compiled with the –disable-wallet option. I’ll try tonight to recompile with the wallet option.
  4. unsystemizer commented at 12:11 pm on January 17, 2016: contributor
    Yeah, I should mention that I watched IO and it’s usually around 1.6 to 3.6 MB/s with only abuot 100 or so IO requests per second and that I use an actual external SANDisk SSD. Maybe there’s better performance consistency on that device for this type of workload. I run both mainnet and testnet on this Pi, both with wallet enabled.
  5. laanwj commented at 11:29 am on January 18, 2016: member

    This RPC call is expected to take a lot of time with slow I/O or CPU, it does a linear scan over the UTXO database. It may be that a timeout happens. Try setting this to a higher value when calling bitcoin-cli (option only on 0.12.x and master):

    0  -rpcclienttimeout=<n>
    1       Timeout during HTTP requests (default: 900)
    
  6. laanwj added the label RPC on Jan 18, 2016
  7. laanwj added the label Resource usage on Feb 16, 2016
  8. laanwj commented at 10:51 am on April 28, 2016: member
    I think the timeout issue is a red herring here. An empty gettxoutsetinfo indicates that GetUTXOStats() failed. In that case an error will have been logged, check your debug.log. Most likely there is corruption and you need to reindex.
  9. laanwj closed this on Sep 29, 2016

  10. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 10:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me