I haven’t seen many discussions on this subject, but are there any ways or plans to upgrade NodeJS into version 14? Version 12 is limited on some parts and generally, v14 adds more support for top-level async and other important and useful features of Node. Sure someone may say v12 is LTS hence why it’s used, but alongside other versions, v14.15.5 is also LTS.
So back to the original question, is there a way to use NodeJS v14+ or any plans by cfx to do that?
nta
February 18, 2021, 11:04am
2
Node 14.x has a few critical bugs with certain external APIs that seem unfixed still .
opened 01:16PM - 24 Sep 20 UTC
When I upgraded to node v14, I started getting intermittent crashes when trying … to load a library (see below). The code that causes the crash looks like this. (I say looks like this because the names have been changed and also it's intermittent.)
```
var ffi = require('ffi-napi');
var ref = require('ref-napi');
var voidPtr = ref.refType(ref.types.void);
var g = ffi.Library('mylib64', {
'new_object': [voidPtr, []],
});
```
It doesn't seem to actually matter what specific functions I put in the list --- sometimes it crashes, sometimes not --- but the more functions, the more certain the crash (maybe because there's a higher chance of causing the issue?), and there needs to be at least 1 function in my tests.
It looks related to #71 and nodejs/node#32463 , but not sure. Have tried v14.3 v14.11 and v14.12, and all are the same. No issues on v13.14.0.
```
#
# Fatal error in , line 0
# Check failed: result.second.
#
#
#
#FailureMessage Object: 0000005E6BFFD540
1: 00007FF6FC04E94F v8::internal::wasm::DisjointAllocationPool::~DisjointAllocationPool+74447
2: 00007FF6FBF889BF std::basic_ostream<char,std::char_traits<char> >::operator<<+55551
3: 00007FF6FCB570D2 V8_Fatal+162
4: 00007FF6FC6191CD v8::internal::BackingStore::Reallocate+653
5: 00007FF6FC844929 v8::ArrayBuffer::GetBackingStore+137
6: 00007FF6FC0319D9 napi_get_typedarray_info+393
7: 00007FF8D1B77AC1
8: 00007FF8D1B774DC
9: 00007FF8D1B7C220
10: 00007FF8D1B7846E
11: 00007FF8D1B77827
12: 00007FF8D1B7CCF3
13: 00007FF6FC02C4C6 node::Stop+29366
14: 00007FF6FC807C5F v8::internal::Builtins::builtin_handle+330191
15: 00007FF6FC8071EE v8::internal::Builtins::builtin_handle+327518
16: 00007FF6FC8074E7 v8::internal::Builtins::builtin_handle+328279
17: 00007FF6FC807333 v8::internal::Builtins::builtin_handle+327843
18: 00007FF6FC8E538D v8::internal::SetupIsolateDelegate::SetupHeap+466093
19: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
20: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
21: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
22: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
23: 00007FF6FC8770C9 v8::internal::SetupIsolateDelegate::SetupHeap+14825
24: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
25: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
26: 00007FF6FC8F7C66 v8::internal::SetupIsolateDelegate::SetupHeap+542086
27: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
28: 00007FF6FC8770C9 v8::internal::SetupIsolateDelegate::SetupHeap+14825
29: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
30: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
31: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
32: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
33: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
34: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
35: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
36: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
37: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
38: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
39: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
40: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
41: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
42: 00007FF6FC87D528 v8::internal::SetupIsolateDelegate::SetupHeap+40520
43: 00007FF6FC87B10E v8::internal::SetupIsolateDelegate::SetupHeap+31278
44: 00007FF6FC87ACFC v8::internal::SetupIsolateDelegate::SetupHeap+30236
45: 00007FF6FC75EC0F v8::internal::Execution::CallWasm+1743
46: 00007FF6FC75E41F v8::internal::Execution::Call+191
47: 00007FF6FC837FC7 v8::Function::Call+615
48: 00007FF6FC020ECF napi_unref_threadsafe_function+2911
49: 00007FF6FC024AD7 node::Start+1143
50: 00007FF6FC024ED1 node::Start+2161
51: 00007FF6FC06DF58 node::LoadEnvironment+56
52: 00007FF6FBFB0C33 EVP_CIPHER_CTX_buf_noconst+39971
53: 00007FF6FC024780 node::Start+288
54: 00007FF6FBE866FC RC4_options+339452
55: 00007FF6FCDA04CC v8::internal::compiler::RepresentationChanger::Uint32OverflowOperatorFor+156812
56: 00007FF91CC67BD4 BaseThreadInitThunk+20
57: 00007FF91DFCCE51 RtlUserThreadStart+33
Segmentation fault
```
opened 05:44PM - 24 Mar 20 UTC
closed 10:15AM - 16 May 20 UTC
buffer
addons
node-api
flaky-test
>
>
> unrelated failure in multiple different PRs?
>
> test.node-api/test… _buffer/test
>
> ```
> #
> # Fatal error in , line 0
> # Check failed: result.second.
> #
> #
> #
> #FailureMessage Object: 0x3fffcd8ab3d0
> 1: 0x106f06f4 [out/Release/node]
> 2: 0x11b83bec V8_Fatal(char const*, ...) [out/Release/node]
> 3: 0x10c4685c v8::internal::GlobalBackingStoreRegistry::Register(std::shared_ptr<v8::internal::BackingStore>) [out/Release/node]
> 4: 0x1089f2c0 v8::ArrayBuffer::GetBackingStore() [out/Release/node]
> 5: 0x106385f8 [out/Release/node]
> 6: 0x108fb184 [out/Release/node]
> 7: 0x108fd324 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [out/Release/node]
> 8: 0x11377680 [out/Release/node]
> ```
Not sure why you pinged build here as that's a code problem (failing check). From the stack trace and previously (https://github.com/nodejs/node/issues/31061) that check is to with arraybuffers and backing stores. If it's occurring in multiple PR's that would suggest something has landed on master that has regressed.
_Originally posted by @richardlau in https://github.com/nodejs/node/pull/32414#issuecomment-603353246_
Until this is fixed, we can’t upgrade.
Node.js’ release schedule seems to be utter trash, things are marked as ‘stable’ and ‘LTS’ even despite not being working whatsoever , and since we have a lot of customizations to Node.js codebase to integrate with external IO loops, there’s also a massive potential of regressions that people will take 3-4 weeks to report if an API is missing a wrapper or such.
Also,
alepouna:
is limited on some parts
Is it? No matter what version of V8 or I/O wrappers are used, it’s Turing-complete, so not ‘limited’ at all.
top-level async is a V8 feature, nothing to do with Node.js and likely would not be supported in our runtime without random additional nonsense.
Like… what?