You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Maximum call stack size exceeded" causes a crash in "async_hooks" module #37989
If any error occurs, an exception or other similar error-reporting stuff should be thrown.
Well, there is a RangeError thrown. it's not catched in your code.
But if you put your before/after handler within a try/catch a real crash happens which is described in #36079
Well, there is a RangeError thrown. it's not catched in your code.
I'm not sure what you mean but the node instance still exits (abnormally) although there has been a RangeError thrown. I don't know if this is a normal behavior.
Activity
zyscoder commentedon Mar 31, 2021
The following js code can also trigger "Maximum call stack size exceeded":
Flarna commentedon Mar 31, 2021
Well, there is a
RangeErrorthrown. it's not catched in your code.But if you put your before/after handler within a try/catch a real crash happens which is described in #36079
zyscoder commentedon Mar 31, 2021
I'm not sure what you mean but the node instance still exits (abnormally) although there has been a RangeError thrown. I don't know if this is a normal behavior.
Flarna commentedon Mar 31, 2021
If any AsyncHook callbacks throw, the application will print the stack trace and exitsee https://nodejs.org/dist/latest-v14.x/docs/api/async_hooks.html#async_hooks_error_handlingPhakornKiong commentedon Mar 31, 2021
@zyscoder
Let me try to chip in on this,
You can try to run this in
Nodejs REPLand seeWhich is actually just a very simple function
This would produce (a snippet of it since it keeps repeating)
I presumed the REPL is ran with some
asyncstuff likesetTimout,process.nextTick()that is causing StackOverflow.Any reason why you would want to do this in REPL?
src: rethrow stack overflow exceptions in async_hooks
src: rethrow stack overflow exceptions in async_hooks
src: rethrow stack overflow exceptions in async_hooks
src: rethrow stack overflow exceptions in async_hooks
src: rethrow stack overflow exceptions in async_hooks
src: rethrow stack overflow exceptions in async_hooks