<!-- Thank you for reporting an issue. This issue tracker is for bugs and issues found within Node.js core. If you require more general support please file an issue on our help repo. https://github.com/nodejs/help Please fill in as much of the template below as you're able. Version: output of `node -v` Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) Subsystem: if known, please specify affected core module name --> * **Version**: Node v14.15.0 (also reproducible on `master`, 831f4c755d2270e7b44c075176ab4a05698d21d9) * **Platform**: Linux (`uname -a`: Linux apechkurov-laptop 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux) * **Subsystem**: `async_hooks` ### What steps will reproduce the bug? <!-- Enter details about your bug, preferably a simple code snippet that can be run using `node` directly without installing third-party dependencies. --> ```js 'use strict'; const { AsyncLocalStorage } = require('async_hooks'); const als = new AsyncLocalStorage(); function run(count) { if (count !== 0) { return als.run({}, run, --count); } } run(1000); ``` It's enough to run this script with `node --stack-size=100 async-hooks-crash.js`. ### How often does it reproduce? Is there a required condition? Always ### What is the expected behavior? <!-- If possible please provide textual output instead of screenshots. --> `RangeError: Maximum call stack size exceeded` should be reported in the crash output: ``` $ node --stack-size=100 async-hooks-crash.js ... RangeError: Maximum call stack size exceeded ... ``` ### What do you see instead? <!-- If possible please provide textual output instead of screenshots. --> ``` $ node --stack-size=100 async-hooks-crash.js Error: async hook stack has become corrupted (actual: 111, expected: 70) 1: 0x97e352 node::AsyncHooks::pop_async_context(double) [node] 2: 0x979587 node::AsyncWrap::PopAsyncContext(v8::FunctionCallbackInfo<v8::Value> const&) [node] 3: 0xbe369b [node] 4: 0xbe4c46 [node] 5: 0xbe52c6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node] 6: 0x13ff259 [node] ``` ### Additional information <!-- Tell us anything else you think we should know. --> This issue was observed in CI runs for #34573 and #35779 Refs: #15448 (the condition is different and that issue was fixed a long time ago)
Activity
Flarna commentedon Jan 7, 2022
I can't reproduce this with latest 14, 16 and 17 versions. But it is still reproducible with 12.22.8
targos commentedon Apr 8, 2022
Closing this issue because v12.x goes EOL at the end of this month and no more releases are planned.