-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit 0aad61e8 breaks interaction via V8 debugger protocol #1745
Comments
Prefix of the response: https://gist.github.com/1230388 |
can you please provide a method to reproduce? cc @indutny |
I'm using a tool that we're building in Emacs for developing in Node, but I think I'm able to reproduce the issue using the Node debugger (I can't use stdin with the Node debugger, but an HTTP handler seems to behave the same way):
At that point Node's CPU utilization jumps up to 100%. |
I've opened http://code.google.com/p/v8/issues/detail?id=1705 to get some input from the V8 folks. |
It looks like the v8 folks are considering the issue of large backtraces a feature request. Is there anything that can be done on the Node side? From what I can see, debugging of Node IO callbacks is completely broken (which to me means debugging a running Node app is broken). |
@indutny In case it wasn't clear, I was using 0.5.7 (or master) in the above steps to reproduce the issue. Are you saying that when you perform these steps you aren't experiencing the same behavior as I am? Where does 'print' come in? I'm trying to get a backtrace for its own sake. |
@sctb sorry, looks like I missed your point. I think I may take a look at v8's debuggers and probably fix it, because Feature Requests ain't being processed quickly by v8 team. |
@indutny We are not back porting the debugger changes to v0.4. That branch is only getting critical fixes now. |
@indutny Did you happen to check into this on the v8 side? |
@indutny I posted http://code.google.com/p/v8/issues/detail?id=1705#c4 to explain why this problem is so troublesome for us. I know you're working on similar things so want to get your take. Seems to me this bug makes it impossible to use the Debugger Protocol with Node. Any time you have the misfortune to request a backtrace when some frame anywhere in the stack contains a large array, the system basically does a DOS attack on you by writing out more JSON than can ever be read, and the only solution is to kill the process. Surely it would be a mistake to try to fix this on the Node side? Node isn't doing anything wrong by using large arrays. On the contrary, it's the debugger's job to work with any well-formed program in the language it targets. My questions: (1) do you agree or what am I missing? (2) what do you see as the best way to fix this? |
Just to follow up: the solution is not to use the JSON protocol in the first place but rely on V8's debugger objects instead. |
As of 0.6.3, the simple test case that I posted above continues causes the issue. The node debugger is still unable to debug a running web server. |
@sctb http://codereview.chromium.org/8873053, we're going to backport this to node once it'll get merged. |
should be fixed now, see ^ |
I realize this issue is closed, but there seems to be a problem in v8 anyway. Without the inlineRefs flag set to true (!), Anyone know how to search http://codereview.chromium.org for that bug? |
When making a backtrace request to the V8 debugger agent while broken inside a stdin 'data' handler (via exception or debugger statement) the debugger agent responds with header that indicates that an excessively large JSON response will follow (> 25MB). This seems to cause node's CPU utilization to become pegged at ~100% and the response is never completed. This issue was not present in 0aad61e's parent.
The text was updated successfully, but these errors were encountered: