Repository: node
Issue: "Fatal error, unreachable code" seen intermittently on v20.10.0
Labels: confirmed-bug

### Version

v20.10.0

### Platform

Linux codespaces-110a35 6.2.0-1018-azure #18~22.04.1-Ubuntu SMP Tue Nov 21 19:25:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

_No response_

### What steps will reproduce the bug?

Sorry, I don't have an easy repro.

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

I can't repro it reliably, it happens intermittently. In CI, I'm seeing it a few times per day

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

It shouldn't crash

### What do you see instead?

```
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0x7fffaf0a2d00
 1: 0xd17f41  [node]
 2: 0x20fe211 V8_Fatal(char const*, ...) [node]
 3: 0x10c1d84 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 4: 0x10c2ef5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 5: 0x1534cea v8::internal::Heap::AllocateRawOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 6: 0x1535fb2 v8::internal::Deserializer<v8::internal::Isolate>::Allocate(v8::internal::AllocationType, int, v8::internal::AllocationAlignment) [node]
 7: 0x1539589 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
 8: 0x1539909 int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHandle<v8::internal::Isolate> >(unsigned char, v8::internal::SlotAccessorForHandle<v8::internal::Isolate>) [node]
 9: 0x153a20f v8::internal::Deserializer<v8::internal::Isolate>::ReadObject() [node]
10: 0x1539556 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
11: 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
12: 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
13: 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
14: 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
15: 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
16: 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
17: 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
18: 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
19: 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
20: 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
21: 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
22: 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
23: 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
24: 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[25](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:26): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[26](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:27): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[27](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:28): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[28](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:29): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[29](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:30): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[30](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:31): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[31](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:32): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[32](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:33): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[33](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:34): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[34](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:35): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[35](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:36): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[36](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:37): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[37](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:38): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[38](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:39): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[39](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:40): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[40](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:41): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[41](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:42): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[42](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:43): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[43](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:44): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[44](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:45): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[45](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:46): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[46](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:47): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[47](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:48): 0x153822b int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHeapObject>(unsigned char, v8::internal::SlotAccessorForHeapObject) [node]
[48](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:49): 0x1539361 v8::internal::Deserializer<v8::internal::Isolate>::ReadData(v8::internal::Handle<v8::internal::HeapObject>, int, int) [node]
[49](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:50): 0x1539628 v8::internal::Deserializer<v8::internal::Isolate>::ReadObject(v8::internal::SnapshotSpace) [node]
[50](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:51): 0x1539909 int v8::internal::Deserializer<v8::internal::Isolate>::ReadSingleBytecodeData<v8::internal::SlotAccessorForHandle<v8::internal::Isolate> >(unsigned char, v8::internal::SlotAccessorForHandle<v8::internal::Isolate>) [node]
[51](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:52): 0x153a20f v8::internal::Deserializer<v8::internal::Isolate>::ReadObject() [node]
[52](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:53): 0x1[53](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:54)eda2 v8::internal::ObjectDeserializer::Deserialize() [node]
53: 0x153efb4 v8::internal::ObjectDeserializer::DeserializeSharedFunctionInfo(v8::internal::Isolate*, v8::internal::SerializedCodeData const*, v8::internal::Handle<v8::internal::String>) [node]
[54](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:55): 0x1531cf2 v8::internal::CodeSerializer::Deserialize(v8::internal::Isolate*, v8::internal::AlignedCachedData*, v8::internal::Handle<v8::internal::String>, v8::ScriptOriginOptions, v8::internal::MaybeHandle<v8::internal::Script>) [node]
[55](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:56): 0xf8bd6b  [node]
[56](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:57): 0xf8c04d v8::internal::Compiler::GetSharedFunctionInfoForScriptWithCachedData(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, v8::internal::ScriptDetails const&, v8::internal::AlignedCachedData*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason, v8::internal::NativesFlag) [node]
[57](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:58): 0xeebdcc  [node]
[58](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:59): 0xeebed8 v8::ScriptCompiler::CompileUnboundScript(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason) [node]
[59](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:60): 0xc8c3fe node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [node]
[60](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:61): 0xf29f4f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [node]
[61](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:62): 0xf2a505  [node]
[62](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:63): 0xf2ac23 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
[63](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:64): 0x1[93](https://github.com/VantaInc/obsidian/actions/runs/7187223522/job/19574346489#step:5:94)4df6  [node]
Trace/breakpoint trap (core dumped)

### Additional information

I'm running node using `ts-node`. 
It's being called from a Makefile and several `ts-node` invocations are happening in parallel.