Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FSEventWrap: Aborting due to unwrap failure (Linux) #3997

Closed
medikoo opened this Issue · 6 comments

3 participants

@medikoo

Node v0.8.9 (observed also on v0.8.8, didn't check the others)

I can't narrow it down to simple test case, it's probably result of some race condition.

I have some test scripts that setup watchers (using fs.watch) and later change file system (removal, addition, update of files) in short periods of time. On Linux (Ubuntu 12.04) I get following error:

FSEventWrap: Aborting due to unwrap failure at ../src/fs_event_wrap.cc:169
Aborted (core dumped)

It doesn't happen every time (about 7/10), but when it happens it happens as result of fs.unlink call on file that's being watched.

Same error fails Travis tests: http://travis-ci.org/#!/medikoo/node-ext/jobs/2368332 (not sure what Linux distribution do Travis use).

You can reproduce it with:

$ git clone git://github.com/medikoo/node-ext.git next
$ cd next
$ git checkout 5206759e48
$ npm install
$ npm test
@bnoordhuis

Can you post a standalone test case? I get a lot of errors when I run npm update, e.g.

npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/memoizee/0.1.0
npm http GET https://registry.npmjs.org/event-emitter/0.2.0
npm http GET https://registry.npmjs.org/deferred/0.6.0
npm http GET https://registry.npmjs.org/es5-ext/0.9.0
npm http 404 https://registry.npmjs.org/event-emitter/0.2.0
npm ERR! Error: version not found: 0.2.0 : event-emitter/0.2.0
npm ERR!     at RegClient.<anonymous> (/home/bnoordhuis/opt/node/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:14)
npm ERR!     at Request.init.self.callback (/home/bnoordhuis/opt/node/lib/node_modules/npm/node_modules/request/main.js:120:22)
npm ERR!     at Request.EventEmitter.emit (events.js:91:17)
npm ERR!     at Request.<anonymous> (/home/bnoordhuis/opt/node/lib/node_modules/npm/node_modules/request/main.js:648:16)
npm ERR!     at Request.EventEmitter.emit (events.js:115:20)
npm ERR!     at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/home/bnoordhuis/opt/node/lib/node_modules/npm/node_modules/request/main.js:610:14)
npm ERR!     at IncomingMessage.EventEmitter.emit (events.js:115:20)
npm ERR!     at IncomingMessage._emitEnd (http.js:366:10)
npm ERR!     at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
npm ERR!     at CleartextStream.socketOnData (http.js:1366:20)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.6.0-rc3+
npm ERR! command "/home/bnoordhuis/opt/node/bin/node" "/home/bnoordhuis/bin/npm" "update"
npm ERR! cwd /home/bnoordhuis/src/nodejs/v0.8/tmp/node-ext
npm ERR! node -v v0.8.10-pre
npm ERR! npm -v 1.1.61
npm http 404 https://registry.npmjs.org/deferred/0.6.0
npm http 404 https://registry.npmjs.org/es5-ext/0.9.0
npm http 404 https://registry.npmjs.org/memoizee/0.1.0
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/bnoordhuis/src/nodejs/v0.8/tmp/node-ext/npm-debug.log
npm ERR! not ok code 0

Or:

npm http GET https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/memoizee/0.1.0
npm http GET https://registry.npmjs.org/event-emitter/0.2.0
npm http GET https://registry.npmjs.org/deferred/0.6.0
npm http GET https://registry.npmjs.org/es5-ext/0.9.0
npm http 404 https://registry.npmjs.org/memoizee/0.1.0
npm ERR! 404 'memoizee' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 3.6.0-rc3+
npm ERR! command "/home/bnoordhuis/opt/node/bin/node" "/home/bnoordhuis/bin/npm" "update"
npm ERR! cwd /home/bnoordhuis/src/nodejs/v0.8/tmp/node-ext
npm ERR! node -v v0.8.10-pre
npm ERR! npm -v 1.1.61
npm ERR! code E404
npm http 404 https://registry.npmjs.org/deferred/0.6.0
npm http 404 https://registry.npmjs.org/event-emitter/0.2.0
npm http 404 https://registry.npmjs.org/es5-ext/0.9.0
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/bnoordhuis/src/nodejs/v0.8/tmp/node-ext/npm-debug.log
npm ERR! not ok code 0
@medikoo

Sorry, I provided wrong install instructions. I've updated them, but still you can download standalone case from https://github.com/downloads/medikoo/node-ext/standalone-case-for-node-3997-bug.zip

@bnoordhuis

Thanks, I can reproduce the issue.

@bnoordhuis bnoordhuis was assigned
@bnoordhuis bnoordhuis closed this issue from a commit
@bnoordhuis bnoordhuis fs: fix assert in fs.watch()
Fix the following error:

  FSEventWrap: Aborting due to unwrap failure at ../../src/fs_event_wrap.cc:169

It's possible and legal for a handle to be closed twice. HandleWrap::Close()
deals with that by ignoring the second close. Now FSEventWrap::Close() does
too.

Fixes #3997.
db5c26e
@bnoordhuis

Fixed in db5c26e, thanks for the report.

@medikoo

Great, Thank you!

@brianc

Hmm...this just happened to be in the middle of a big integration test I was running on node v0.9.12. I'll try to reproduce it in a smaller test case. Wanted to report it ASAP since I know v0.10 is about to come out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.