-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
RangeError: Maximum call stack size exceeded #1034
Comments
setTimeout is assumed to be called asynchronously and it's being called synchronously. This seems to be a bug in node? |
Can this be related: nodejs/node-v0.x-archive#25763 ? |
updated: unfortunately thats not the case, it probably just makes it harder to replicate |
p.s. It is broken in Node 0.10, 4.3 and 5.7. The code like this: function f(){
return Promise.delay(1000).then(f);
} will eventually fail with either call stack size exceeded or memory allocation failed. I ended up breaking the loop (which is definitely not as convenient): function f(){
fTimeout = setTimeout(function(){
fPromise = f();
}, 1000);
}
fTimeout = null;
fPromise = f(); |
Wait, you can reproduce this in Node? How? |
I don't have any simplified code that reproduces this unfortunately. The library where this issue happened is no-kafka: oleksiyk/kafka#33 And this small change "fixed" the problem for me: oleksiyk/kafka@f597761 I can reproduce this issue in some circumstances so if anyone can give me hints how to add some debugging I will do that. Unless this issue is considered as closed of course. |
Can someone please help me debug the call stack overflow problem:
The code that triggers it basically is a recursive async loop like this:
I can't replicate it with any simplified code but most of the time it happens when I hibernate the laptop while the program is running, once the lid is open that error is triggered. Few times it was triggered when I stopped the application with SIGINT.
What can I do to debug the problem further?
The text was updated successfully, but these errors were encountered: