Bitcoind bad_alloc -> ConnectBlock fail #7228

issue sipa openend this issue on December 18, 2015
  1. sipa commented at 7:00 am on December 18, 2015: member

    Master branch of a few days ago, ARM CPU, 1 GiB RAM, pruning enabled, IBD:

     02015-12-18 05:00:46 UpdateTip: new best=00000000000000000661605e4cade89011b5ec8733f12179ea7e94ca1ae31776  height=329691  log2_work=81.429488  tx=51224700  date=2014-11-12 14:19:18 progress=0.477754  cache=316.5MiB(227077tx)
     12015-12-18 05:00:47 UpdateTip: new best=00000000000000000f4bb7e7f47239591fab8ea45157e7fb393436fd0c69e5b1  height=329692  log2_work=81.429563  tx=51224930  date=2014-11-12 14:22:13 progress=0.477758  cache=316.8MiB(227214tx)
     22015-12-18 05:00:49 Pre-allocating up to position 0x8000000 in blk00194.dat
     32015-12-18 05:00:50 Prune: UnlinkPrunedFiles deleted blk/rev (00188)
     4
     5
     6************************
     7EXCEPTION: St9bad_alloc
     8std::bad_alloc
     9bitcoin in ProcessMessages()
    10
    112015-12-18 05:01:19
    12
    13************************
    14EXCEPTION: St9bad_alloc
    15std::bad_alloc
    16bitcoin in ProcessMessages()
    17
    182015-12-18 05:01:19 ProcessMessages(block, 736950 bytes) FAILED peer=22
    192015-12-18 05:01:19 ERROR: ConnectBlock(): inputs missing/spent
    202015-12-18 05:01:19 InvalidChainFound: invalid block=000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c  height=329693  log2_work=81.429639  date=2014-11-12 14:44:01
    212015-12-18 05:01:19 InvalidChainFound:  current best=00000000000000000f4bb7e7f47239591fab8ea45157e7fb393436fd0c69e5b1  height=329692  log2_work=81.429563  date=2014-11-12 14:22:13
    222015-12-18 05:01:19 ERROR: ConnectTip(): ConnectBlock 000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c failed
    232015-12-18 05:01:20 InvalidChainFound: invalid block=000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c  height=329693  log2_work=81.429639  date=2014-11-12 14:44:01
    242015-12-18 05:01:20 InvalidChainFound:  current best=00000000000000000f4bb7e7f47239591fab8ea45157e7fb393436fd0c69e5b1  height=329692  log2_work=81.429563  date=2014-11-12 14:22:13
    
  2. sipa commented at 7:04 am on December 18, 2015: member
    I believe we should catch bad_alloc separately in ProcessMessages, and either crash instantly, or call AbortNode.
  3. sipa commented at 7:04 am on December 18, 2015: member
    I don’t understand how this can cause ConnectBlock to fail, though.
  4. jonasschnelli commented at 10:11 am on December 19, 2015: contributor
    Also encountered this during some IBD tests some weeks ago…
  5. jonasschnelli added the label Bug on Dec 19, 2015
  6. sipa commented at 3:24 am on February 25, 2017: member
    Duplicate of #9854.
  7. laanwj closed this on Feb 25, 2017

  8. DrahtBot locked this on Sep 8, 2021


sipa jonasschnelli

Labels
Bug


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-31 06:12 UTC

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