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

2.8.0 Bug for sodium package #716

Closed
vekexasia opened this issue Nov 15, 2017 · 15 comments
Closed

2.8.0 Bug for sodium package #716

vekexasia opened this issue Nov 15, 2017 · 15 comments
Labels

Comments

@vekexasia
Copy link

Hello guys,

apparently sodium package which depends on nan cannot be compiled anymore due to 2.8.0.

Here is the issue i've opened there. paixaop/node-sodium#124

@bnoordhuis
Copy link
Member

They're just warnings, not errors. Closing, not a valid (or good) bug report.

@vekexasia
Copy link
Author

vekexasia commented Nov 15, 2017

Actually @bnoordhuis it does not compile.

Error: make nodesodium exited with code null
    at ChildProcess.<anonymous> (/home/andrea/node_modules/sodium/install.js:288:19)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12)

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 15, 2017

That is a separate issue which is not relevant here.

@anibali
Copy link

anibali commented Nov 23, 2017

A minor release that breaks things for dependants (and hence potentially violates semver) should at least be investigated as a valid bug, right?

@bnoordhuis
Copy link
Member

There is nothing here that suggests it's actually an issue with nan.

@anibali
Copy link

anibali commented Nov 23, 2017

So it is expected that a minor version bump to nan may break dependant packages that have not themselves changed in any way?

@agnat
Copy link
Collaborator

agnat commented Nov 23, 2017

No, of course not.

But if you look carefully nothing in the upstream bug report indicates a nan related error. It's just a warning. So, the thing pasted in the upstream bug is not what caused the build to fail. Hence, there is no indication that this is actually nan's fault. If we get to see the actual error we'll certainly investigate.

Closing, not a valid (or good) bug report.

See what @bnoordhuis means?

@anibali
Copy link

anibali commented Nov 24, 2017

I'm not trying to argue that this was a well-reported bug, just that there does seem to be a bug there :)

The issue was never the warnings, but the fact that a return code check in node-sodium's install script (https://github.com/paixaop/node-sodium/blob/2ba53357c1e1458c156b0e2933509eebdcc8a1fa/install.js#L286-L292) started failing with nan 2.8.0, making node-sodium impossible to install. As far as I can tell from my own sleuthing, the child process in question is nodegyp rebuild (via make), which ran fine for nan < 2.8.0 but now gets terminated by signal (indicated by the null return code).

@bnoordhuis
Copy link
Member

bnoordhuis commented Nov 24, 2017

What's the signal? What gets printed to the screen?

just that there does seem to be a bug there

It's unlikely. Nan is widely used, any actual breaking change would have us swamped in bug reports. Odds are better than even it's a node-sodium bug (edit: or maybe an ICE.)

@anibali
Copy link

anibali commented Nov 24, 2017

What gets printed to screen is exactly what the original reporter linked, which admittedly isn't very useful, but also isn't "just warnings":

/home/aiden/Projects/Node/node-sodium/install.js:289
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make nodesodium exited with code null
    at ChildProcess.<anonymous> (/home/aiden/Projects/Node/node-sodium/install.js:289:19)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js --install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/aiden/.npm/_logs/2017-11-24T01_05_00_019Z-debug.log

After some poking around I found that the signal was SIGTERM. So perhaps the upgrade to nan 2.8.0 somehow causes node-gyp rebuild to end via SIGTERM? Using nan 2.7.0 works fine, no signal.

@anibali
Copy link

anibali commented Nov 24, 2017

After even more investigation, I think I've figured it out. child_process.exec was killing the node-gyp child process due to maxBuffer being reached, since upgrading to nan 2.8.0 causes a lot more warnings to be printed out.

So I suppose that the bug is invalid after all, but you have to admit---it's a pretty odd situation! Technically the upgrade to nan 2.8.0 did cause node-sodium to stop building ;)

@agnat
Copy link
Collaborator

agnat commented Nov 24, 2017

How is a broken build script an odd situation?

@agnat
Copy link
Collaborator

agnat commented Nov 24, 2017

But congrats for solving it!

@victortony
Copy link

i encountered this problem, too. The version of nan is 2.6.2

Build node-sodium module
node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unexpected end of file
gyp ERR! stack at Gunzip.zlibOnError (zlib.js:152:15)
gyp ERR! System Linux 4.9.49-moby
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /src/server/node_modules/sodium
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
make: *** [Makefile:80: nodesodium] Error 1
/src/server/node_modules/sodium/install.js:288
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make nodesodium exited with code 2
at ChildProcess. (/src/server/node_modules/sodium/install.js:288:19)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install.js --install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

@bnoordhuis
Copy link
Member

@victortony Different issue. "Unexpected end of file" means a corrupted download. rm -rf ~/.node-gyp/ and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants