Bitcoind bad_alloc -> ConnectBlock fail #7228

issue sipa opened 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:

    2015-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)
    2015-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)
    2015-12-18 05:00:49 Pre-allocating up to position 0x8000000 in blk00194.dat
    2015-12-18 05:00:50 Prune: UnlinkPrunedFiles deleted blk/rev (00188)
    
    
    ************************
    EXCEPTION: St9bad_alloc
    std::bad_alloc
    bitcoin in ProcessMessages()
    
    2015-12-18 05:01:19
    
    ************************
    EXCEPTION: St9bad_alloc
    std::bad_alloc
    bitcoin in ProcessMessages()
    
    2015-12-18 05:01:19 ProcessMessages(block, 736950 bytes) FAILED peer=22
    2015-12-18 05:01:19 ERROR: ConnectBlock(): inputs missing/spent
    2015-12-18 05:01:19 InvalidChainFound: invalid block=000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c  height=329693  log2_work=81.429639  date=2014-11-12 14:44:01
    2015-12-18 05:01:19 InvalidChainFound:  current best=00000000000000000f4bb7e7f47239591fab8ea45157e7fb393436fd0c69e5b1  height=329692  log2_work=81.429563  date=2014-11-12 14:22:13
    2015-12-18 05:01:19 ERROR: ConnectTip(): ConnectBlock 000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c failed
    2015-12-18 05:01:20 InvalidChainFound: invalid block=000000000000000008c189d4cd55d898cfbab27454f9eca7f8c5dbef3720161c  height=329693  log2_work=81.429639  date=2014-11-12 14:44:01
    2015-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
Contributors
Labels

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: 2026-04-13 21:15 UTC

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