Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot allocate memory in static TLS block #47

Closed
timotejroiko opened this issue Oct 30, 2017 · 11 comments
Closed

cannot allocate memory in static TLS block #47

timotejroiko opened this issue Oct 30, 2017 · 11 comments

Comments

@timotejroiko
Copy link
Contributor

my app is running it fine in a windows machine with node-webkit and nw-gpy. now im trying to port it into pure nodejs to use in a linux VPS.

The standard "npm install swisseph" works fine, but its version 2.02, not the latest swisseph 2.06
i tried both "npm install swisseph-new" and "npm install swisseph-zp", as well as downloading the zip package and running "node-gyp rebuild". all of them build but give the following error when running:

genesis@genesis-virtual-machine ~/astrobot $ node index.js
module.js:641
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: /home/genesis/astrobot/node_modules/swisseph-new/build/Release/swisseph.node: cannot allocate memory in static TLS block
    at Object.Module._extensions..node (module.js:641:18)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/genesis/astrobot/node_modules/swisseph-new/lib/swisseph.js:1:78)
    at Module._compile (module.js:612:30)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)

@keel
Copy link
Collaborator

keel commented Oct 31, 2017

That is not the swisseph's issue, you can try to update glibc on your server, if your vps is CentOS ,you can try yum update -y.
checkout nodesource/distributions#513

@timotejroiko
Copy link
Contributor Author

timotejroiko commented Oct 31, 2017

@keel Thanks for your response. im running linux mint 18 (based on ubuntu 16), node 8.8.1, glibc version 2.23 and libc6 version 2.23
the older version of swisseph present in npm works fine. was there a change in glibc requirment between swisseph versions?
edit: i installed libc6 / glibc 2.26 and reinstalled swisseph-new but the problem persists

@keel
Copy link
Collaborator

keel commented Nov 1, 2017

swisseph-new is my work to update swisseph to 2.0.6, (sorry mivion, I need this version at that time), now mivion have done the update, so I reset it to mivion's version, but mivion forgot to push to npm.

@mivion please publish this version to npm, so we can use the new one.

@timotejroiko you can try to update swisseph-new which is same as mivion's current version. or downgrade the nodejs to 6 for a try.

@timotejroiko
Copy link
Contributor Author

timotejroiko commented Nov 1, 2017

@keel I tried switching to various node versions, including 6 and the newest 9. problem persists on all of them. I used nvm to switch node version, then used npm install swisseph-new again.

i messed around with the files a bit and the problem seems to occur somewhere in swisseph/deps

perhaps it is also a problem with my virtual machine. i will try to test in another environment

EDIT: It successfully installed and ran in another virtual machine running linux mint 14. It seems the problem is indeed this linux installation. I will reinstall linux mint 18 and test it again.

Edit2: still no success in linux mint 18 after a clean install. i dont know what the problem is...

@keel
Copy link
Collaborator

keel commented Nov 2, 2017

@timotejroiko I'm not familiar with glibc nor ubuntu, and I have no environment to test it. If I were you, I will try this:
1.Change Ubuntu package server
2.Reinstall all dependency package from new server
3.Reinstall nodejs
I just found this steps from another issue like yours, but it may takes a lot of time .

@timotejroiko
Copy link
Contributor Author

timotejroiko commented Nov 2, 2017

@keel The problem seems to be with the architecture. I installed the x64 version of mint 18 this time and it worked. my previous install that didnt work was x86. so either there is a problem with the new swisseph and x86 or there is a problem in the x86 version of dependencies.

well, for now the issue has been resolved.

@mivion
Copy link
Owner

mivion commented Nov 2, 2017

@keel could you make a PR, or even add you as contributor?

Also i've added you as collaborator to npm. You may publish updated version.

@timotejroiko @keel thanks a lot for your help.

@keel
Copy link
Collaborator

keel commented Nov 3, 2017

@mivion thanks for your trust, I have published the updated version to npm.

@keel keel closed this as completed Nov 3, 2017
@mivion
Copy link
Owner

mivion commented Nov 3, 2017

@keel, thanks for your help.
Could you create a release tag in repo to be the same as in npmjs.org?

@mivion mivion reopened this Nov 3, 2017
@keel
Copy link
Collaborator

keel commented Nov 3, 2017

OK, it's done.

@mivion
Copy link
Owner

mivion commented Nov 5, 2017

👍

@mivion mivion closed this as completed Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants