Bitcoin Forum
December 11, 2016, 02:07:51 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: unable to allocate memory for mutex; resize mutex region/EXCEPTION:11DbException  (Read 2909 times)
tytus
Sr. Member
****
Offline Offline

Activity: 276



View Profile WWW
May 09, 2012, 02:50:02 PM
 #1

I am trying to start bitcoind on various debian machines. The blockchain loading stops at a consistent location with a db error:

tytus@home:~/.bitcoin$ ~/.bitcoin/bitcoind getinfo
{
    "version" : 60006,
    "protocolversion" : 60000,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 156638,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 1090715.68005127,
    "testnet" : false,
    "keypoololdest" : 1336563519,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : "EXCEPTION: 11DbException       \nDb::put: Cannot allocate memory       \nbitcoin in ProcessMessage()       \n"
}

tytus@home:~/.bitcoin$ head db.log
unable to allocate memory for mutex; resize mutex region

It looks like a db4.8 problem. I have tried the latest binaries and a self compiled version. My ulimits are:

tytus@home:~/.bitcoin$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) 2097152
file locks                      (-x) unlimited

I have searched for answers on the web and found only this transcript:
http://bitcoinstats.com/irc/bitcoin-dev/logs/2011/08/11

but without a solution.

Maybe by manually adding a DB_CONFIG file in ~/.bitcoin I can solve this but there must be an official solution. Can anybody help?

PicoStocks.com, High-tech startup fundraising, evaluation and profit sharing
1481465271
Hero Member
*
Offline Offline

Posts: 1481465271

View Profile Personal Message (Offline)

Ignore
1481465271
Reply with quote  #2

1481465271
Report to moderator
1481465271
Hero Member
*
Offline Offline

Posts: 1481465271

View Profile Personal Message (Offline)

Ignore
1481465271
Reply with quote  #2

1481465271
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2002



View Profile
May 09, 2012, 07:13:45 PM
 #2

Are you using a recent release (e.g., v0.6.2 ?)

Sorry, just read that you wrote "tried latest binaries"

Are you using the same blockchain db files on each attempt?  If so, does a new blockchain data file resolve it?  If so, delete and download a secure, full blockchain again.

A nightly of the blockchain data (and other sources) is:
 - http://bitcoin.stackexchange.com/a/3552/153

tytus
Sr. Member
****
Offline Offline

Activity: 276



View Profile WWW
May 09, 2012, 10:03:59 PM
 #3

I found a solution

I increased the mutex region by adding a DB_CONFIG file

___@___:~/.bitcoin$ cat DB_CONFIG
mutex_set_max 100000

The region went from 2MB to 12MB ... this is for suer too much. Setting mutex_set_max to 32k should be sufficient. To test the current utilization on a running bitcoind:

___@___:~/.bitcoin$ db4.8_stat -x
12MB 1000KB     Mutex region size
0       The number of region locks that required waiting (0%)
4       Mutex alignment
100     Mutex test-and-set spins
100000  Mutex total count
77212   Mutex free count
22788   Mutex in-use count
22789   Mutex maximum in-use count
Mutex counts
77212   Unallocated
3       db handle
1       env dblist
2       env handle
1       env region
23      lock region
3668    logical lock
1       log filename
1       log flush
2       log region
3       mpoolfile handle
14955   mpool buffer
3       mpool filehandle
17      mpool file bucket
1       mpool handle
4099    mpool hash bucket
1       mpool region
1       mutex region
1       twister
1       txn active list
1       transaction checkpoint
2       txn commit
1       txn region

PicoStocks.com, High-tech startup fundraising, evaluation and profit sharing
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!