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

Node v6.6.0 PBKDF2() Out of Memory #293

Closed
scttcper opened this issue Sep 16, 2016 · 6 comments
Closed

Node v6.6.0 PBKDF2() Out of Memory #293

scttcper opened this issue Sep 16, 2016 · 6 comments

Comments

@scttcper
Copy link

scttcper commented Sep 16, 2016

Updated from node v6.5.0 to v6.6.0 and now I'm getting a weird crash. I've narrowed it down to rethinkdbdash 2.3.23 or the included version of rethinkdb.

$ node -v
v6.6.0
$ npm -v
3.10.7
$node
> const r = require('rethinkdbdash')();
Creating a pool connected to localhost:28015
undefined
> FATAL ERROR: node::PBKDF2() Out of Memory
 1: node::Abort() [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 3: node::ClearFatalExceptionHandlers(node::Environment*) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 4: node::crypto::RandomBytesWork(uv_work_s*) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 6: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 7: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/scoope7/.nvm/versions/node/v6.6.0/bin/node]
 8: 0x3082330092a7
 9: 0x3082332562bd
[1]    26049 abort      node
@scttcper scttcper changed the title Node v6.6.0 Node v6.6.0 PBKDF2() Out of Memory Sep 16, 2016
@neumino
Copy link
Owner

neumino commented Sep 17, 2016

How much memory do you have on your machine? You just ran out of memory.
Maybe there's a bug in crypto in 6.6.0

@scttcper
Copy link
Author

My coworker told me about the error and I reproduced the same error after updating to v6.6.0.
osx 10.11.6. Node installed via nvm.

It probably is a v6.6.0 PBKDF2 bug. hmmm.... 😐

@scttcper
Copy link
Author

scttcper commented Sep 17, 2016

I've narrowed it down to the following from connection.js which crashes every time. Can close this.

var crypto = require('crypto');

var salt = new Buffer('McWpw6FL29zJ6E97Le3hKQ==', 'base64')
crypto.pbkdf2('', salt, 1, 32, "sha256", function(error, saltedPassword) {
  console.log(error)
  console.log(saltedPassword)
})

I've opened nodejs/node#8571

@niieani
Copy link

niieani commented Sep 17, 2016

I think this should be left open until the issue is resolved in Node. Will save time for others trying to figure out what's wrong...

@neumino
Copy link
Owner

neumino commented Sep 17, 2016

Let's keep it open such that it's easier for people to find the link to the node's bug.

@nfantone
Copy link

@scttcper I can confirm that with the recent release of 6.7.0, this no longer happens.

@neumino You may consider closing the issue.

@neumino neumino closed this as completed Oct 7, 2016
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

4 participants