nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
108.08k stars 29.83k forks source link

"Fatal error in , line 0 unreachable code" in v20.17.0 #55289

Open emichael opened 1 month ago

emichael commented 1 month ago

Version

v20.17.0

Platform

Linux 5.15.0-122-generic #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

docker run ghcr.io/immich-app/immich-server:v1.117.0

How often does it reproduce? Is there a required condition?

It is 100% reproducible on my system. The error happens ~immediately.

What is the expected behavior? Why is that the expected behavior?

It shouldn't crash.

What do you see instead?

Detected CPU Cores: 10

#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0x7ffccf547000
----- Native stack trace -----

 1: 0xd3f611  [node]
 2: 0x217b8b1 V8_Fatal(char const*, ...) [node]
 3: 0x12da498  [node]
 4: 0x12da53a  [node]
 5: 0x13c981a v8::internal::Object::GetProperty(v8::internal::LookupIterator*, bool) [node]
 6: 0x1538aa9 v8::internal::Runtime::GetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool*) [node]
 7: 0x11d328b v8::internal::KeyedLoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
 8: 0x11d3571 v8::internal::Runtime_KeyedLoadIC_Miss(int, unsigned long*, v8::internal::Isolate*) [node]
 9: 0x196aef6  [node]
Trace/breakpoint trap (core dumped)

Additional information

This was previously reported in https://github.com/immich-app/immich/issues/12133. Both the original reporter and I are running in a similar environment (Docker/Debian-based VM/bhyve/FreeBSD/Ryzen CPU).

RedYetiDev commented 1 month ago

v20.17.0 is not the latest version. If you can reproduce in v20.18.0, please let me know, and include a minimal reproduction, without the need of external dependencies.

emichael commented 1 month ago

Yes it is reproducible in v20.18.0. No, I can't provide any other means of reproduction. I can send a core dump, though. I'm not a node dev and don't want to spend any more time on this.

anonrig commented 1 month ago

Please send a core dump if you can.

caugner commented 1 week ago

Please send a core dump if you can.

We're experiencing this issue regularly in MDN's GitHub workflows since moving from Node.js 18 to 20 (see here and here from today).

@anonrig Would you know how we can gather a core dump from these failed workflow runs?


Stack trace 1 ``` # # Fatal error in , line 0 # unreachable code # # # #FailureMessage Object: 0x7ffc292fd010 ----- Native stack trace ----- 1: 0xd45071 [node] 2: 0x218d121 V8_Fatal(char const*, ...) [node] 3: 0x157d6cc int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 4: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 5: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 6: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 7: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 8: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 9: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 10: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 11: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 12: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 13: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 14: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 15: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 16: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 17: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 18: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 19: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 20: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 21: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 22: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 23: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 24: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 25: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 26: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 27: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 28: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 29: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 30: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 31: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 32: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 33: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 34: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 35: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 36: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 37: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 38: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 39: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 40: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 41: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 42: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 43: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 44: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 45: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 46: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 47: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 48: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 49: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 50: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 51: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 52: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 53: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 54: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 55: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 56: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 57: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 58: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 59: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 60: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 61: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 62: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 63: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 64: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 65: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 66: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 67: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 68: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 69: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 70: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 71: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 72: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 73: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 74: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 75: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 76: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 77: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 78: 0x157ee19 int v8::internal::Deserializer::ReadSingleBytecodeData >(unsigned char, v8::internal::SlotAccessorForHandle) [node] 79: 0x157f71f v8::internal::Deserializer::ReadObject() [node] 80: 0x15842b2 v8::internal::ObjectDeserializer::Deserialize() [node] 81: 0x15844c4 v8::internal::ObjectDeserializer::DeserializeSharedFunctionInfo(v8::internal::Isolate*, v8::internal::SerializedCodeData const*, v8::internal::Handle) [node] 82: 0x1577202 v8::internal::CodeSerializer::Deserialize(v8::internal::Isolate*, v8::internal::AlignedCachedData*, v8::internal::Handle, v8::ScriptOriginOptions, v8::internal::MaybeHandle) [node] 83: 0xfd06ab [node] 84: 0xfd098d v8::internal::Compiler::GetSharedFunctionInfoForScriptWithCachedData(v8::internal::Isolate*, v8::internal::Handle, v8::internal::ScriptDetails const&, v8::internal::AlignedCachedData*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason, v8::internal::NativesFlag) [node] 85: 0xf3079c [node] 86: 0xf308a8 v8::ScriptCompiler::CompileUnboundScript(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason) [node] 87: 0xcb4111 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo const&) [node] 88: 0xf6e88f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node] 89: 0xf6ee45 [node] 90: 0xf6f563 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node] 91: 0x1979df6 [node] ```
Stack trace 2 ``` # # Fatal error in , line 0 # Check failed: current == end_slot_index. # # # #FailureMessage Object: 0x7fffbb90be101.22.22 ----- Native stack trace ----- 1: 0xd45071 [node] 2: 0x218d121 V8_Fatal(char const*, ...) [node] 3: 0x157e8a1 [node] 4: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 5: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 6: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 7: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 8: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 9: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 10: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 11: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 12: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 13: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 14: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 15: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 16: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 17: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 18: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 19: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 20: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 21: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 22: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 23: 0x157d73b int v8::internal::Deserializer::ReadSingleBytecodeData(unsigned char, v8::internal::SlotAccessorForHeapObject) [node] 24: 0x157e871 v8::internal::Deserializer::ReadData(v8::internal::Handle, int, int) [node] 25: 0x157eb38 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node] 26: 0x157ee19 int v8::internal::Deserializer::ReadSingleBytecodeData >(unsigned char, v8::internal::SlotAccessorForHandle) [node] 27: 0x157f71f v8::internal::Deserializer::ReadObject() [node] 28: 0x15842b2 v8::internal::ObjectDeserializer::Deserialize() [node] 29: 0x15844c4 v8::internal::ObjectDeserializer::DeserializeSharedFunctionInfo(v8::internal::Isolate*, v8::internal::SerializedCodeData const*, v8::internal::Handle) [node] 30: 0x1577202 v8::internal::CodeSerializer::Deserialize(v8::internal::Isolate*, v8::internal::AlignedCachedData*, v8::internal::Handle, v8::ScriptOriginOptions, v8::internal::MaybeHandle) [node] 31: 0xfd06ab [node] 32: 0xfd098d v8::internal::Compiler::GetSharedFunctionInfoForScriptWithCachedData(v8::internal::Isolate*, v8::internal::Handle, v8::internal::ScriptDetails const&, v8::internal::AlignedCachedData*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason, v8::internal::NativesFlag) [node] 33: 0xf3079c [node] 34: 0xf308a8 v8::ScriptCompiler::CompileUnboundScript(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason) [node] 35: 0xcb4111 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo const&) [node] 36: 0xf6e88f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node] 37: 0xf6ee45 [node] 38: 0xf6f563 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node] 39: 0x1979df6 [node] ```
lpummer commented 5 days ago

@caugner It looks to me like you're facing https://github.com/nodejs/node/issues/51555, which is results in the same Fatal message as this issue, but the stack trace is quite different. Maybe take a look at that issue instead for workarounds.