EXCEPTION: St9bad_alloc std::bad_alloc bitcoin in ProcessMessages() #7361

issue btcid opened this issue on January 17, 2016
  1. btcid commented at 2:17 AM on January 17, 2016: none

    my wallet blockchain was crashed and I unable to start it back with -reindex

    it already synced to block num 340870, and it will be crashed every 5-10 blocks:

    EXCEPTION: St9bad_alloc       
    std::bad_alloc       
    bitcoin in ProcessMessages()       
    
    2016-01-17 02:12:03 ProcessMessages(block, 749055 bytes) FAILED peer=6
    
    

    config:

    daemon=1
    rpcport=12345
    rpcuser=xxx
    rpcpassword=xxxx
    
    maxconnections=8
    paytxfee=0.0001
    
    minrelaytxfee=0.0001
    limitfreerelay=5
    

    the server has 16gb of RAM and 10gb of swap.

    the wallet has 100k of addresses

    any help would be very appreciated.

    thanks

  2. btcid commented at 2:25 AM on January 17, 2016: none

    i tried

    export MALLOC_ARENA_MAX=1

    still crashing 1-2 minutes after bitcoind up

    "version" : 110200, "protocolversion" : 70002, "walletversion" : 60000,

  3. pstratem commented at 6:29 AM on January 17, 2016: contributor

    sounds like you're running out of memory

  4. btcid commented at 6:36 AM on January 17, 2016: none

    memory is 16gb and 10gb of swap. i monitor when the crash happened, only 7gb of memory being used.

  5. btcid commented at 6:46 AM on January 17, 2016: none

    debug.log

    2016-01-17 06:44:39 
    
    ************************
    EXCEPTION: St9bad_alloc       
    std::bad_alloc       
    bitcoin in ProcessMessages()
    

    memory stats:

    time       total       used       free     shared    buffers     cached
    2016-01-17 06:44:39          16174       7017       9157          0         33       3993
    
  6. laanwj added the label P2P on Jan 18, 2016
  7. laanwj commented at 12:57 PM on February 9, 2016: member

    std::bad_alloc is raised only for one reason: out of memory. Are you perhaps running a 32-bit version of bitcoind? Lots of GB of memory won't help if the application cannot address it.

  8. btcid commented at 4:09 PM on February 9, 2016: none

    sorry for not updating. yes it turned out it was a 32 bit box. no wonder it kept running out of memory.

  9. btcid closed this on Feb 9, 2016

  10. DrahtBot locked this on Sep 8, 2021
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-21 18:15 UTC

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