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

Abort on node v0.11.13 #105

Closed
madbence opened this issue May 31, 2014 · 33 comments
Closed

Abort on node v0.11.13 #105

madbence opened this issue May 31, 2014 · 33 comments

Comments

@madbence
Copy link

I'm using the 0.11-wip branch

node-leveldown λ node -pe "process.versions"
{ http_parser: '2.2',
  node: '0.11.13',
  v8: '3.25.30',
  uv: '0.11.25',
  zlib: '1.2.3',
  modules: '14',
  openssl: '1.0.1g' }
node-leveldown λ node
> require('./')('./data').open(function(err) { console.log('Done!', err); });
undefined
> node: ../src/node.cc:1027: v8::Handle<v8::Value> node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*): Assertion `enter->IsFunction()' failed.
fish: Job 1, “node” terminated by signal SIGABRT (Abort)

Is 0.11.13 supported?

@ifraixedes
Copy link

It doesn't work for me either.
By the way, tried in Linux, 3.11.0-24 .

@mko
Copy link

mko commented Jul 15, 2014

Fails for me on npm install. Running 0.11.13 as well, on OS X 10.9.3.

Here's the full error log in a gist: https://gist.github.com/mko/8ac56025617516027cb8

@madbence
Copy link
Author

@mko are you on the correct branch (0.11-wip)? Install works just fine for me (same node&osx)

@ifraixedes
Copy link

I hadn't try with 0.11-wip, in that branch it compiles, not sure if it works because I have to use as a dependency of another module and right now I have to make this patch in my local and write the implementation part which will use it.
@madbence thanks for your comment, it allowed me to know what branch I had to use.

@tjwebb
Copy link

tjwebb commented Jul 25, 2014

+1 leveldown 0.10.2 fails in node 0.11.13

@ifraixedes
Copy link

Let you know I've used a little bit, in the time being the branch 0.11-wip works fine with node v0.11.13

@dominictarr
Copy link
Contributor

node 11 is much less stable, especially in the native api, so some versions do not work. node 10 works fine though

@tjwebb
Copy link

tjwebb commented Jul 25, 2014

node 0.11.13 also has a lot of features that node 0.10.x does not

@voodootikigod
Copy link

I am experiencing this in node-serialport as well -- anyone have any updates on it? Should we post it to rvagg/nan as well -- /cc @rvagg

@heapwolf
Copy link

heapwolf commented Aug 3, 2014

I am running node 0.11.10 and the most recent version of leveldown which work fine.

@voodootikigod
Copy link

can you try node v 0.11.13 please @hij1nx ?

@heapwolf
Copy link

heapwolf commented Aug 3, 2014

@voodootikigod I tried very recently, it doesn't work. But iirc, there are only a few things that need to be done before a release can happen.

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

@voodootikigod I haven't experienced it. If you have an easily reproducable test case then post to rvagg/nan and one of the Smart:tm: people will be on to it.

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

FYI the 0.11-wip branch is mildly borked here as of today. I'll be on to it later today to try and work towards a release and will try and repro this issue.

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

@trevnorris I'm going to pull you guys in to this because I can easily reproduce this using the code above, running on 0.11.13, and it looks to me like it might be a Node core problem and not LevelDOWN or NAN (I could be wrong) since we're not doing anything fancy other than wrapping MakeCallback up in a cross-version compatible form.

Build LevelDOWN branch 0.11-wip, run in a 0.11.13 REPL and execute:

require('./')('./data').open(function(err) { console.log('Done!', err); });

And you'll get an assertion from within MakeDomainCallback, in a spot I don't believe we should even be in because we're not invoking domains at all!

i.e. this bit:

  if (!object.IsEmpty()) {
    domain_v = object->Get(env->domain_string());
    has_domain = domain_v->IsObject();
    if (has_domain) {
      domain = domain_v.As<Object>();

      // snip ...

      Local<Function> enter =
          domain->Get(env->enter_string()).As<Function>();
      assert(enter->IsFunction());

Here's gdb:

#0  0x00007ffff6c00f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6c04388 in __GI_abort () at abort.c:89
#2  0x00007ffff6bf9e36 in __assert_fail_base (fmt=0x7ffff6d4b718 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0xbcba3b "enter->IsFunction()", file=file@entry=0xbcd500 "../src/node.cc", 
    line=line@entry=1027, 
    function=function@entry=0xbcf380 <node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*)::__PRETTY_FUNCTION__> "v8::Handle<v8::Value> node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*)") at assert.c:92
#3  0x00007ffff6bf9ee2 in __GI___assert_fail (assertion=0xbcba3b "enter->IsFunction()", file=0xbcd500 "../src/node.cc", line=1027, 
    function=0xbcf380 <node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*)::__PRETTY_FUNCTION__> "v8::Handle<v8::Value> node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*)") at assert.c:101
#4  0x000000000099aeca in node::MakeDomainCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) ()
#5  0x000000000099afb5 in node::MakeCallback(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) ()
#6  0x000000000099bdab in node::MakeCallback(v8::Isolate*, v8::Handle<v8::Object>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) ()
#7  0x00007ffff6154d9c in NanCallback::Call (this=0x10b4720, argc=0, argv=0x0) at ../node_modules/nan/nan.h:1824
#8  0x00007ffff615505f in NanAsyncWorker::HandleOKCallback (this=0x10cde60) at ../node_modules/nan/nan.h:1911
#9  0x00007ffff6154fcc in NanAsyncWorker::WorkComplete (this=0x10cde60) at ../node_modules/nan/nan.h:1881
#10 0x00007ffff61533dd in NanAsyncExecuteComplete (req=0x10cde68) at ../node_modules/nan/nan.h:1948
#11 0x0000000000b54b8d in uv__work_done (handle=0x10710f0 <default_loop_struct+176>) at ../deps/uv/src/unix/threadpool.c:217
#12 0x0000000000b488ed in uv__async_event (loop=0x1071040 <default_loop_struct>, w=<optimised out>, nevents=<optimised out>) at ../deps/uv/src/unix/async.c:89
#13 0x0000000000b489c3 in uv__async_io (loop=0x1071040 <default_loop_struct>, w=0x10711e8 <default_loop_struct+424>, events=<optimised out>) at ../deps/uv/src/unix/async.c:160
#14 0x0000000000b578d5 in uv__io_poll (loop=loop@entry=0x1071040 <default_loop_struct>, timeout=-1) at ../deps/uv/src/unix/linux-core.c:282
#15 0x0000000000b493fb in uv_run (loop=0x1071040 <default_loop_struct>, mode=UV_RUN_ONCE) at ../deps/uv/src/unix/core.c:294
#16 0x000000000099f3b1 in node::Start(int, char**) ()
#17 0x00007ffff6bebec5 in __libc_start_main (main=0x5dc400 <main>, argc=1, argv=0x7fffffffde88, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7fffffffde78)
    at libc-start.c:287
#18 0x00000000005dc528 in _start ()

master may be fine with this (haven't tested) but since getting releases of Node out at the moment is like pulling teeth is there a workaround we can implement to make things happy with 0.11.13?

/cc @thlorenz

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

/cc @kkoopa

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

oh, only reproducible in the REPL so I guess that narrows it right down

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

problem still exists on master

@voodootikigod
Copy link

I can recreate (for serialport) in a script execution, so its not just repl (same error, different code). Is this better to move to nan repo at this point?

@rvagg
Copy link
Member

rvagg commented Aug 3, 2014

@voodootikigod yes if you have a file that will do it, please file it in nan

@trevnorris
Copy link

If this is moved to nan, please link the bug. I'd still like to have a look.

@trevnorris
Copy link

Yeah. Built and ran the following:

/var/projects/node/node -e 'require("./")("./data").open(function(err) { console.log("Done!", err); });'

Didn't have an issue. @voodootikigod would like to see your reproducible script.

@voodootikigod
Copy link

Will do.

On Monday, August 4, 2014, Trevor Norris notifications@github.com wrote:

Yeah. Built and ran the following:

/var/projects/node/node -e 'require("./")("./data").open(function(err) { console.log("Done!", err); });'

Didn't have an issue. @voodootikigod https://github.com/voodootikigod
would like to see your reproducible script.


Reply to this email directly or view it on GitHub
#105 (comment)
.

Chris Williams

@voodootikigod http://twitter.com/voodootikigod | GitHub
http://github.com/voodootikigod

The things I make that you should check out:
SaferAging http://www.saferaging.com/ | JSConf http://jsconf.com/ |
RobotsConf http://robotsconf.com/ | RobotsWeekly
http://robotsweekly.com/

Help me end the negativity on the internet, share this
http://jsconf.eu/2011/an_end_to_negativity.html.

@rvagg
Copy link
Member

rvagg commented Aug 5, 2014

@trevnorris node -e isn't enough, you have to run the REPL

@trevnorris
Copy link

@rvagg yeah, and I can reproduce in the REPL. Issue is that I can't run the REPL and lldb at the same time.

@rvagg
Copy link
Member

rvagg commented Aug 5, 2014

@trevnorris that's a bit lame, you can do it with gdb

@trevnorris
Copy link

@rvagg Problem is that --gdbjit --gdbjit-full, ironically, doesn't work on gdb. lldb will give me much more useful information in this case.

@RobinQu
Copy link

RobinQu commented Aug 11, 2014

+1

Any progress?

@madbence
Copy link
Author

@RobinQu

$ npm install rvagg/node-leveldown#0.11-wip

Works fine with regular scripts (tested with simple koa app), but fails in the REPL.

@RobinQu
Copy link

RobinQu commented Aug 11, 2014

Actually leveldown is a dependency of another npm module, and I have no permissions to change its package.json.

Hope to see it comes to master.

Thanks anyway.

在 2014年8月11日,下午4:53,Bence Dányi notifications@github.com 写道:

@RobinQu

$ npm install rvagg/node-leveldown#0.11-wip
Works fine with regular scripts (tested with simple koa app), but fails in the REPL.


Reply to this email directly or view it on GitHub.

@kkoopa
Copy link

kkoopa commented Sep 14, 2014

This has been fixed: nodejs/node-v0.x-archive@81a9739

Move to close.

@rvagg
Copy link
Member

rvagg commented Sep 15, 2014

woohoo!

@rvagg rvagg closed this as completed Sep 15, 2014
@RobinQu
Copy link

RobinQu commented Sep 15, 2014

great!

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