Repository navigation
Node 22.5.0 started to crash and hangs on different cases #53902
Copy link
Copy link
Closed
51Degrees/pipeline-node
#129Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.regressionIssues related to regressions.Issues related to regressions.v22.xIssues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.Issues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
Version
22.5.0
Platform
macOS 15.0, M1
What steps will reproduce the bug?
Now I haven't much time to properly debug it, so a couple of cases:
Clone core-js repo.
npm i just hangs on.
Ok, if we somehow install dependencies and run npm test, Node crashes with:
FATAL ERROR: v8::Object::GetCreationContextChecked No creation context available
----- Native stack trace -----
1: 0x104a4e230 node::OnFatalError(char const*, char const*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
2: 0x104c20898 v8::Utils::ReportApiFailure(char const*, char const*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
3: 0x104c358fc v8::Object::GetCreationContextChecked() [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
4: 0x104a55f88 node::fs::FastClose(v8::Local<v8::Object>, int, v8::FastApiCallbackOptions&) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
5: 0x10b9accc4
6: 0x1056a6c0c Builtins_JSEntryTrampoline [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
7: 0x1056a68f4 Builtins_JSEntry [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
8: 0x104d50564 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
9: 0x104d4fadc v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
10: 0x104c369cc v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
11: 0x104970fa0 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
12: 0x104987d8c node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
13: 0x104a53ca4 node::fs::FSReqCallback::Resolve(v8::Local<v8::Value>) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
14: 0x104a549a8 node::fs::AfterInteger(uv_fs_s*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
15: 0x104a482fc node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
16: 0x105684a70 uv__work_done [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
17: 0x105688544 uv__async_io [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
18: 0x10569ab08 uv__io_poll [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
19: 0x105688b08 uv_run [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
20: 0x104971714 node::SpinEventLoopInternal(node::Environment*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
21: 0x104a8f8f0 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
22: 0x104a8f688 node::NodeMainInstance::Run() [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
23: 0x104a15928 node::Start(int, char**) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
24: 0x18b2cf274 start [/usr/lib/dyld]
#
# Fatal error in , line 0
# Missing deoptimization information for OptimizedFrame::Summarize.
#
#
#
#FailureMessage Object: 0x16b488648
----- Native stack trace -----
1: 0x104ab7a4c node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
2: 0x105f3e5d4 V8_Fatal(char const*, ...) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
3: 0x104d5993c v8::internal::OptimizedFrame::Summarize(std::__1::vector<v8::internal::FrameSummary, std::__1::allocator<v8::internal::FrameSummary>>*) const [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
4: 0x104d62c60 v8::internal::Isolate::CaptureDetailedStackTrace(int, v8::StackTrace::StackTraceOptions) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
5: 0x104c2ace0 v8::StackTrace::CurrentStackTrace(v8::Isolate*, int, v8::StackTrace::StackTraceOptions) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
6: 0x104a4cc0c node::GetCurrentStackTrace(v8::Isolate*, int) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
7: 0x1049b869c node::DumpJavaScriptBacktrace(__sFILE*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
8: 0x104a4e238 node::OnFatalError(char const*, char const*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
9: 0x104c20898 v8::Utils::ReportApiFailure(char const*, char const*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
10: 0x104c358fc v8::Object::GetCreationContextChecked() [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
11: 0x104a55f88 node::fs::FastClose(v8::Local<v8::Object>, int, v8::FastApiCallbackOptions&) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
12: 0x10b9accc4
13: 0x1056a6c0c Builtins_JSEntryTrampoline [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
14: 0x1056a68f4 Builtins_JSEntry [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
15: 0x104d50564 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
16: 0x104d4fadc v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
17: 0x104c369cc v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
18: 0x104970fa0 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
19: 0x104987d8c node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
20: 0x104a53ca4 node::fs::FSReqCallback::Resolve(v8::Local<v8::Value>) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
21: 0x104a549a8 node::fs::AfterInteger(uv_fs_s*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
22: 0x104a482fc node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
23: 0x105684a70 uv__work_done [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
24: 0x105688544 uv__async_io [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
25: 0x10569ab08 uv__io_poll [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
26: 0x105688b08 uv_run [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
27: 0x104971714 node::SpinEventLoopInternal(node::Environment*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
28: 0x104a8f8f0 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
29: 0x104a8f688 node::NodeMainInstance::Run() [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
30: 0x104a15928 node::Start(int, char**) [/Users/denispuskarev/.nvm/versions/node/v22.5.0/bin/node]
31: 0x18b2cf274 start [/usr/lib/dyld]
/bin/bash: line 1: 92352 Trace/BPT trap: 5 npm run build-compat
on this script.
The same error happens, for example, if we somehow built it (for example, with the previous Node version) and run other scripts like this.
In most of those cases used zx and / or konan.
Sure, before Node 22.5.0, everything worked fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.fsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.regressionIssues related to regressions.Issues related to regressions.v22.xIssues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.Issues that can be reproduced on v22.x or PRs targeting the v22.x-staging branch.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Activity
avivkeller commentedon Jul 17, 2024
Given the stack trace you've produced, I've optimistically applied the
fsandv8 enginelabels, but those can always be changed.cjihrig commentedon Jul 17, 2024
#53627 seems like the likely culprit.
avivkeller commentedon Jul 17, 2024
Also, for reference, the erroring line is
node/src/node_file.cc
Line 994 in 7b573d1
merceyz commentedon Jul 17, 2024
Similar issue showing up in Yarn (yarnpkg/berry#6398), it either hangs or if run with
CI=truethennodestops mid execution without an error code.Bisects to #53627.
avivkeller commentedon Jul 17, 2024
I've opened a revert PR #53904 if this needs to be reverted.
anonrig commentedon Jul 17, 2024
@joyeecheung Any idea how is this possible?
anonrig commentedon Jul 17, 2024
This needs a better repro than the following command which runs 10+ subprocesses.
avivkeller commentedon Jul 17, 2024
https://github.com/latin-1/berry-node-22.5.0-broken/ is slightly better, but not perfect.
anonrig commentedon Jul 17, 2024
I can not test it locally, but technically this should fix the bug: #53910
targos commentedon Jul 17, 2024
I think we should hold on landing future fast API pull requests until we have a way to guarantee that the added code paths are tested.
72 remaining items
options: pin newer Node version
options: pin newer Node version
options: pin newer Node version
Use latest NodeJS on CI (#273)
Revert "Pins `node` to 22.4.1 temporarily (#64)" (#65)
Revert "Temporarily downgrade node until nodejs/node#53902 fix is in …
Revert "Temporarily downgrade node until nodejs/node#53902 fix is in …
Revert "Pin node to 22.4.x to workaround breakage" (#16731)
danishasifdev commentedon Mar 28, 2025
yes, the new version 22.5 was taking so much memory and eventually slowing down everything. I had to downgrade to version 20.19 which works best for me.
fix!: drop Node.js v18 support
fix!: drop Node.js v18 support
fix!: drop Node.js v18 support
fix!: drop Node.js v18 support across the board (#1886)
fix!: drop Node.js v18 support across the board (#1886)
Use latest NodeJS on CI (#273)