[Question] Building ARM on 64bit x86 Docker
zaxharperdb opened this issue · 8 comments
The new docker experimental buildx to build multi-arch images on a single host.
NOTE: node-lmdb works fine with docker builds on the ARM arch, just curiosity, and using buildx would make my life a little easier during releases.
Ubuntu 18.04 Host machine. Docker 19.03
OS: node 12.16.1 Alipine linux
npm install node-lmdb @0.9.3, Builds without issue as far as I can tell.
But after build and when we run our install it throws this following,
There was an error during the install. Please check the install logs.
ERROR: Error: Function not implemented
Error: Function not implemented
at Object.createEnvironment (/opt/harperdb/utility/lmdb/environmentUtility.js:139:17)
at async lmdbCreateTable (/opt/harperdb/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.js:38:9)
at async createLMDBTables (/opt/harperdb/utility/mount_hdb.js:86:13) {
code: 38
Code snippets, not sure how helpful this will be, just some context.
*environmentUtility.sj 139
let env_init = new OpenEnvironmentObject(environment_path, MAP_SIZE, MAX_DBS, true, true, MAX_READERS);
env.open(env_init);
*lmdbCreateTable:38
//create the new environment
await environment_utility.createEnvironment(schema_path, table_create_obj.table);
*mount_hdb.js:86
await lmdb_create_table(undefined, create_table);
Any insight or clues on where I may look or flags to add during install would be greatly appreciated.
Thank you for your time,
Z
I tried it with arm64v8 ubuntu and got a better error: cannot allocate memory.
thanks thanks.
I'll throw out a few ideas just based on a little research:
- Are you still using
use_vl32
/MDB_VL32
? Maybe try turning that off (I accidentally left it on in some of our builds and ran into MDB_TXN_FULL error). - Try using a smaller map size (I assume your
MAP_SIZE
constant). I know that LMDB docs suggest setting this very large, but we have had plenty of problems (performance and disk space usage) with relying on OS to grow the file with a really large initial map size (rather than incrementally growing it manually). - I saw some mention of issues with TLS (I have seen compiler issues with them), you could try removing the
thread_local
modifier in https://github.com/Venemo/node-lmdb/blob/master/src/txn.cpp#L313 and line 330 and see if it makes a difference.
Good news.. Ill give those a try!
My bad!
I deleted my post, to edit for better news.
Something did work. I am not 100%, I did a lot of things, But I was NOT deleting the Directory of the Dbs ..
After a long walk, I realized that I needed to remove the existing directories.
I think it was the map size but I will reiterate the suggestions in isolation and double-check.
Thank you for your expertise.
You never figured out exactly what the issue was?
No problem, was just curious.