-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
DCHECK(IsNumber) Crash when running debug node 4.8.3 with meteor #13351
Comments
Does it work with node v6.x? |
Sorry, I'm not sure I can easily test that as meteor (and associated packages) only support 4.x at the moment, though moving to 6.x is in progress - I'll see if I can get the alpha release working to test. |
crash1.txt looks like a V8 bug at first glance:
The
Calling If it doesn't work, then you should be able to inspect with llnode (with the |
@mscdex I managed to get the pre-release of meteor working with node 6.10.3, then built a debug build and ran with that for a while. It was substantially slower and rebuilding and relaunching the app was unbearable - but in my usage to trying to reproduce the issue I couldn't. It's obviously not definitive but 6.10.3 appears to not have the issue. |
@bnoordhuis I switched back to debug node 4.8.3 and reproduced the issue, but for some reason I couldn't compile llnode when installed via npm, so I tried brew install llnode. This loaded into lldb but segfaulted everytime I tried ShortPrint didn't seem to work:
But after quite a bit of trial and error with the IsXxx() functions I got:
I was trying to find out what the callback which returned the value was, but I'm not sure how to drive lldb well enough, and it wouldn't let me call GetName() on cb. And I couldn't get the casting right to convert it to a v8::Function. I did check that cb->IsFunction() returned true (no big surprise). |
After a bit more trying, I've got a 'v8 bt' dump: Again, head_response->IsUndefined() returns true. |
It's the parserOnHeadersComplete function in lib/_http_common.js. Since we haven't received bug reports for regular node applications and since I can't see how the return value could be |
Meteor does use faye-websocket and they appear to replace the callback, so I've raised an issue there, to suggest that the implementation match in always returning a number. However, it strikes me that given a call out to regular js code (I can't tell whether that code was ever intended to be replaced), that the head_response should be checked first (e.g. with IsNumber()). |
It's not. I'll close this out - if you touch internals and it breaks, that's not a bug in core. |
Whilst trying to gather more information for a different issue, I downloaded and built the node 4.8.3 sources with debug, and then ran a complex app (including meteor, angular, plus a non-trivial app) with lldb attached.
After significant usage of the app (and significant startup time), say 30minutes, I get the following error in a debug build (release build is fine):
Attached are two files containing more lldb output:
crash1.txt
crash2.txt
The error occurs at the
DCHECK(IsNumber())
whenthis
according to lldb is0x1baddead0baddeaf
aka kHandleZapValue (but that may be spurious/out-of-date frame information).In both crashes the error occurs when doing some form of http header processing, with the data being different in the two cases.
Sadly, I don't think I can give reliable repro instructions, and I realize that there's a large stack of components sitting on top of node in order to exhibit the problem. But with my setup, it seems to be just a matter of time to repeat.
As some background, meteor (in development mode) runs two node processes one acting as a http proxy to the other. It also uses websockets, and when the app is in use there will be regular traffic both ways on the websocket. When the source of the app changes (detected via file system monitoring), the app is rebuilt and either the client and/or the server parts are reloaded as needed.
In the cases that triggered the problem, I think it was only the client restarting and hence probably re-establishing a proxied websocket, but would also have been reloading a number of non-weksocket http content too.
The text was updated successfully, but these errors were encountered: