Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: topshibedoge on January 01, 2014, 08:00:23 PM



Title: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: topshibedoge on January 01, 2014, 08:00:23 PM
I've been struggling for over a day with this. I need to be able to compile a working Litecoin QT wallet for Windows from source, because I'm with a group that's launching a new scrypt altcoin soon. I've got the wallet compiling to an EXE, but when it runs it shows the splash screen but then crashes and I get this error in db.log:

Quote
unable to allocate memory for mutex; resize mutex region
Unable to acquire/release a mutex; check configuration
PANIC: Operation not permitted
process-private: unable to find environment

Same thing happens when compiling multiple wallet sources including Litecoin, Dogecoin, Mooncoin, and more. It's a problem with the maximum mutexes setting of the DB library apparently, and manually configuring a max in a DB_CONFIG file seems to work for everybody according to Google searches, but not for me. Something seems to be hosed in my DB dependency. Does anybody have a working DB dependency for MinGW32 that's able to compile these wallets correctly that they can share with me? Or even the entire deps+MinGW system?

Or alternately, does anybody know how I can just fix the error I'm getting? Thanks!


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: topshibedoge on January 01, 2014, 11:51:31 PM
If it helps, I'm using DB 4.8.30, QT 4.8.4 and GCC 4.4.


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: thcst8 on January 03, 2014, 09:09:40 PM
If it helps, I'm using DB 4.8.30, QT 4.8.4 and GCC 4.4.

What version of windows do you build with?  Win 7 x64?


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: topshibedoge on January 04, 2014, 12:36:21 AM
If it helps, I'm using DB 4.8.30, QT 4.8.4 and GCC 4.4.

What version of windows do you build with?  Win 7 x64?

Thanks for the reply. I tried it on two machines. One was Win 7 x64 and the other was Win 8 x64, but I'm using the 32-bit MinGW/GCC. I want a 32-bit wallet for maximum compatibility. Would it be less hassle to cross-compile from a Debian box? Something tells me no...


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: topshibedoge on January 05, 2014, 10:34:48 AM
Solved this on my own. If anybody else is having the same issue, try using Berkeley DB version 5.0.32. Worked for me.


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: thcst8 on January 05, 2014, 07:48:35 PM
Solved this on my own. If anybody else is having the same issue, try using Berkeley DB version 5.0.32. Worked for me.

Congrats! Which version of gcc did you use?


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: topshibedoge on January 06, 2014, 05:19:54 AM
Solved this on my own. If anybody else is having the same issue, try using Berkeley DB version 5.0.32. Worked for me.

Congrats! Which version of gcc did you use?

Originally 4.4, but then later 4.6.2... both work though with the newer DB version.


Title: Re: Self-compiled QT win32 wallet crashes with "unable to allocate memory for mutex"
Post by: Remember remember the 5th of November on January 06, 2014, 05:27:48 AM
Solved this on my own. If anybody else is having the same issue, try using Berkeley DB version 5.0.32. Worked for me.

Congrats! Which version of gcc did you use?

Originally 4.4, but then later 4.6.2... both work though with the newer DB version.
Why don't you use a newer one? 4.6.2 is very old.