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

After update to 0.6.6 i get "Meteor server restartedAbort trap: 6" #1483

Closed
crapthings opened this Issue Oct 11, 2013 · 12 comments

Comments

Projects
None yet
6 participants
@crapthings

crapthings commented Oct 11, 2013

after code change server fail to start

will show this error on terminal Meteor server restartedAbort trap: 6

osx 10.8.5

@ltbesh

This comment has been minimized.

ltbesh commented Oct 11, 2013

Same here, I have this :
2013-10-11 15:29 node4162 FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-21)
Abort trap: 6

osx 10.8.3

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 11, 2013

Hi folks,

Yeah, this is an issue affecting multiple people. Still trying to track down the root cause.

Can you please try the releases:

  • node-no-fsevents-1
  • node-no-fsevents-2
  • node-no-fsevents-3
  • node-no-fsevents-4

in your app by running meteor --release node-no-fsevents-N for each one and let me know what happens?

Thanks!

@ltbesh

This comment has been minimized.

ltbesh commented Oct 11, 2013

Here is everything I did in a gist : https://gist.github.com/ltbesh/6932070

I left everything even thought the same message appears lots of time.

Hope it helps

@crapthings

This comment has been minimized.

crapthings commented Oct 11, 2013

it even happens with save file twice.

@Telemakhos

This comment has been minimized.

Telemakhos commented Oct 11, 2013

@n1mmy Could this be related with #1337? It happens also on code changes...

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 11, 2013

@ltbesh Thanks, this is helpful.

The ReferenceError you get:

W2034-17:05:30.099(8)? (STDERR) ReferenceError: require is not defined
W2034-17:05:30.105(8)? (STDERR)     at app/node_modules/fsevents/fsevents.js:5:12
W2034-17:05:30.106(8)? (STDERR)     at app/node_modules/fsevents/fsevents.js:71:3
W2034-17:05:30.106(8)? (STDERR)     at /Users/Lucas/Documents/Programmation/JS/meteor/Cours/.meteor/local/build/programs/server/boot.js:154:10
W2034-17:05:30.106(8)? (STDERR)     at Array.forEach (native)
W2034-17:05:30.107(8)? (STDERR)     at Function._.each._.forEach (/Users/Lucas/.meteor/tools/03de220d29/lib/node_modules/underscore/underscore.js:79:11)
W2034-17:05:30.109(8)? (STDERR)     at /Users/Lucas/Documents/Programmation/JS/meteor/Cours/.meteor/local/build/programs/server/boot.js:81:5

Is because of the npm install fsevents line at the top. This put a directory node_modules in your app, which meteor is trying to read and include in your app. rm -rf node_modules in your meteor app directory should clear that up.

However, even with that problem, I can see that the error is still occurring on all the test releases.

I've built one more, hopefully got it this time. Can you please try out --release node-no-fsevents-5?

@ltbesh

This comment has been minimized.

ltbesh commented Oct 11, 2013

Ok, the thing is that in order to continue working I rolled back to 0.6.5 and deleted my commits related to 0.6.6 because it was a mess.

Now when I update again to 0.6.6 I don't have the bug anymore. I tried meteor --release node-no-fsevents-5 and it works :
=> Using Meteor node-no-fsevents-5 as requested (overriding Meteor 0.6.6)

[[[[[ ~/Documents/Programmation/JS/meteor/Cours ]]]]]

=> Meteor server running on: http://localhost:3000/

But I cannot say what would be the situation if I had the bug. I will continue coding with only meteor and if the bug strikes back I will post here the result of meteor --release node-no-fsevents-5.

@zachdixon

This comment has been minimized.

zachdixon commented Oct 11, 2013

I had the same error message without the Abort trap: 6, and tried everything I could find relating to this error in node and libuv, but nothing fixed it. Changed to the --release node-no-fsevents-5 and it worked.

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 11, 2013

Thanks, @zachdixon! Other reports of this issue also seem to indicate -5 fixes the issue.

The fix is to just stop using fs.watch... Tried lots of node versions and fixes, and there just doesn't seem to be a way to get it to work right on MacOS. Instead we'll poll the directory listing every 500ms like we poll file mtimes. This may add a bit of latency to the add/remove file -> meteor restart -> see page reload cycle, which is unfortunate, but better than crashing =)

I'm gonna clean up the patch, do some QA, and hopefully release 0.6.6.1 soon.

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 12, 2013

0.6.6.1 is now released. Hopefully this resolves the issue!

@n1mmy n1mmy closed this Oct 12, 2013

@n1mmy

This comment has been minimized.

Member

n1mmy commented Oct 15, 2013

Hey peeps,

Even though we worked around this issue by not using fs.watch in 0.6.6.1, we'd like to help the node folks track down the underlying issue.

Can someone who experienced this issue try to get a core dump and stack trace of the crash? This requires having XCode installed on your machine for access to gdb. Here's how:

  • Enable core dumps by running ulimit -c unlimited
  • Run your app with Meteor version 0.6.6: meteor --release 0.6.6
  • Wait for it to crash
  • There should now be a new file in /cores/ created at the time of the crash
  • Run gdb ~/.meteor/tools/0663f84bef/bin/node /cores/<your core file>
  • Type thread apply all backtrace full at the gdb prompt
  • Paste it all into a new gist (https://gist.github.com/) and link it here in this ticket.

Thanks!
-- Nick

n1mmy referenced this issue in joyent/libuv Oct 15, 2013

unix: revert recent FSEvent changes
This commit reverts the following commits:

    983fa68 darwin: fix 10.6 build error in fsevents.c
    684e212 fsevents: use shared FSEventStream
    ea4cb77 fsevents: FSEvents is most likely not thread-safe
    9bae606 darwin: create fsevents thread on demand

Several people have reported stability issues on OS X 10.8 and bus
errors on the 10.9 developer preview.

See also nodejs/node-v0.x-archive#6296 and nodejs/node-v0.x-archive#6251.
@jagill

This comment has been minimized.

Contributor

jagill commented Nov 2, 2013

@n1mmy I'm getting this pretty consistently, but running the gdb command on the core dump pretty much freezes my computer (at least, after an hour it had given me no more dots, and i restarted). I have some core dumps that maybe I'll try to process over night?

The way I reproduce it is to have a meteor project running (with some reasonably large number of files), and then do a rm -rf on one of the directories. I'm using meteor 0.6.6.0 and I'm on OS X 10.8.5 build 12F45 . I'll post this info on the node bug as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment