Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Assertion `loop->watchers[w->fd] == w' failed. #838

Closed
emilsedgh opened this issue Jun 23, 2013 · 8 comments
Closed

Assertion `loop->watchers[w->fd] == w' failed. #838

emilsedgh opened this issue Jun 23, 2013 · 8 comments

Comments

@emilsedgh
Copy link

Installed Node 0.10.12 and reinstalled LDAP module.
LDAP module is built fine. However, I get this:

node: ../deps/uv/src/unix/core.c:688: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.

When trying to use it.

@emilsedgh
Copy link
Author

And here is strace output: https://gist.github.com/emilsedgh/5844406

@saghul
Copy link
Contributor

saghul commented Jun 23, 2013

Does the LDAP module use uv_poll_t handles? IIRC I've seen that assertion blow when more than one poll handle is used for the same fd.

@emilsedgh
Copy link
Author

Hi.
Yes it does use uv_poll_t handles.
Is this a node-ldap bug then?

@saghul
Copy link
Contributor

saghul commented Jun 23, 2013

If node-ldap uses more than one poll handle for a given fd at the same
time, then yes.

On Sunday, June 23, 2013, Emil Sedgh wrote:

Hi.
Yes it does use uv_poll_t handles.
Is this a node-ldap bug then?


Reply to this email directly or view it on GitHubhttps://github.com//issues/838#issuecomment-19871381
.

/Saúl
http://saghul.net | http://about.me/saghul

@bnoordhuis
Copy link
Contributor

Tentatively closing. As @saghul points out, this is almost certainly a node-ldap bug. If if turns out the bug is in libuv, holler and I'll reopen the issue.

@falnos24865
Copy link

I am getting the error:
node: ../deps/uv/src/unix/core.c:701: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
I am not using any LDAP module so it cannot be that module. I am heavily using the SerialPort module but it seems this error might be more widespread.

Node: v0.10.32

@saghul
Copy link
Contributor

saghul commented Oct 10, 2014

We've seen this one reported every now and then, but always non-deterministically and / or in a big application. If you can reduce your test case to either a libuv test case or a node core modules only test case, which exhibits the bug deterministically, we can look into it.

@rafahoro
Copy link

I have the same issue in my code. It solved after commenting the a line to create a pipe with child's stdin (the code below was in my code, not in a library, but may help you finding the problematic line):

var cp = spawn(SPAWN_BIN, SPAWN_ARGS, {"env": env});
cp.stdout.pipe(process.stdout);
cp.stderr.pipe(process.stderr);
// https://github.com/Unitech/PM2/issues/659
// process.stdin.pipe is causing the following error when using PM2
//node: ../deps/uv/src/unix/core.c:701: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
//process.stdin.pipe(cp.stdin);

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

No branches or pull requests

5 participants