build icon indicating copy to clipboard operation
build copied to clipboard

Tracking issue for problems on RISC-V Linux platform

Open kxxt opened this issue 5 months ago • 8 comments

While RISC-V is still an unofficial platform, there are lots of interest to push it to experimental tier(#2876) .

This issue tracks bugs that are closely related to linux riscv64 platform.

Build Errors

  • [x] (main, 24.x) https://github.com/nodejs/node/issues/58485 (should be fixed by https://github.com/nodejs/node/pull/58773)

Bugs

  • [x] https://github.com/nodejs/node/issues/47522. This one is caused by a GCC regression and affects arm64 as well.
  • [ ] (v24.x) https://github.com/nodejs/node/issues/60895 https://github.com/riscv-forks/electron/issues/9. Should be fixed by ~~https://github.com/nodejs/node/pull/58746~~ https://github.com/nodejs/node/pull/60962
  • [ ] https://github.com/riscv-forks/electron/issues/7. This one also appears to be a GCC specific bug as node compiled with clang is not affected.
  • [x] (v22.x, v23.x) https://github.com/riscv-forks/electron/issues/6. Fixed by https://github.com/nodejs/node/pull/56781
  • [ ] (all versions after v20.x) https://github.com/riscv-forks/electron/issues/3. WebAssembly's trap handler implementation uses a lot of virtual memory for guard pages, where risc-v systems with Sv39 only have 256GB virtual memory and would quickly run out of address space when multiple wasm are running.
    • [ ] Disabling trap handler would solve it but also leads to other new bugs like https://github.com/riscv-forks/electron/issues/8
  • [ ] (all versions from at least v16.x) https://github.com/revyos/revyos/issues/27. This one only triggers on SG2042, which has 64 cores. It is mysterious as it happens by chance and when gdb is attached, the call stack is already corrupted so the cause is still unknown.
    • This one also appears to affect loongarch64.

Performance Regressions

  • [x] (v21.x, v22.x) https://github.com/riscv-forks/electron/issues/1. Fixed by https://github.com/nodejs/node/pull/53412

kxxt avatar Jul 01 '25 12:07 kxxt

Thanks for collating these links. I'm dumping this info here just now so I have it logged and shared. I'm running various builds at the moment natively (trying to populate my ccaches!) and with the cross-compilers. At the moment the cross compilers are having problems building, and since those are how the unofficial builds need to run it's something we'll want to resolve.

For reference in 24.x I'm getting:

  CXX(host) /home/node/node/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api-arguments.o
In file included from ../deps/v8/src/execution/vm-state-inl.h:12,
                 from ../deps/v8/src/api/api-arguments-inl.h:13,
                 from ../deps/v8/src/api/api-arguments.cc:7:
../deps/v8/src/execution/simulator.h: In static member function 'static int v8::internal::SimulatorStack::JSStackLimitMargin()':
../deps/v8/src/execution/simulator.h:66:55: error: 'JSStackLimitMargin' is not a member of 'v8::internal::Simulator'
   66 |   static int JSStackLimitMargin() { return Simulator::JSStackLimitMargin(); }
      |                                                       ^~~~~~~~~~~~~~~~~~
make: *** [tools/v8_gypfiles/v8_base_without_compiler.host.mk:1140: /home/node/node/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api-arguments.o] Error 1
rm f41dec747f7d07bc6189224d714bfe6f70ce7700.intermediate 4b9faa377f69f07a06bcf45eb52d6b09bd3dc776.intermediate 45471a7c870f238f988ac4c73ccc531d343b1d2d.intermediate 5cf52c47b2c7a3d1debdf7e64552adabc181a77d.intermediate 91e5efd5c01b316d5563811267cb2f34bf83226a.intermediate
make: Leaving directory '/home/node/node/out'

and for main I'm getting:

In file included from ../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:24,
                 from ../deps/v8/third_party/highway/src/hwy/highway.h:722,
                 from ../deps/v8/src/json/json-stringifier.cc:10:
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h: In instantiation of 'struct hwy::N_SCALAR::detail::FixedTagChecker<unsigned char, 16>':
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:423:7:   required by substitution of 'template<class T, long unsigned int kNumLanes> using hwy::N_SCALAR::FixedTag = typename hwy::N_SCALAR::detail::FixedTagChecker::type [with T = unsigned char; long unsigned int kNumLanes = 16]'
  423 | using FixedTag = typename detail::FixedTagChecker<T, kNumLanes>::type;
      |       ^~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3379:29:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendStringSIMD(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3379 |   hw::FixedTag<SrcChar, 16> tag;
      |                             ^~~
../deps/v8/src/json/json-stringifier.cc:3316:28:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendString(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3316 |     return AppendStringSIMD(chars, length, no_gc);
      |            ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:2531:17:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::SerializeString(v8::internal::Tagged<v8::internal::HeapObject>, const v8::internal::DisallowGarbageCollection&) [with StringT = v8::internal::SeqOneByteString; Char = unsigned char; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 2531 |     AppendString(chars, length, no_gc);
      |     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:2554:47:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::TrySerializeSimpleObject(v8::internal::Tagged<v8::internal::Union<v8::internal::Smi, v8::internal::HeapNumber, v8::internal::BigInt, v8::internal::String, v8::internal::Symbol, v8::internal::Boolean, v8::internal::Null, v8::internal::Undefined, v8::internal::JSReceiver> >) [with Char = unsigned char]'
 2554 |       return SerializeString<SeqOneByteString>(obj, no_gc);
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3167:38:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::SerializeObject(v8::internal::Tagged<v8::internal::Union<v8::internal::Smi, v8::internal::HeapNumber, v8::internal::BigInt, v8::internal::String, v8::internal::Symbol, v8::internal::Boolean, v8::internal::Null, v8::internal::Undefined, v8::internal::JSReceiver> >, const v8::internal::DisallowGarbageCollection&) [with Char = unsigned char; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3167 |   FastJsonStringifierResult result = TrySerializeSimpleObject(object);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3509:43:   required from here
 3509 |       one_byte_stringifier.SerializeObject(*object, no_gc);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:369:27: error: static assertion failed: Too many lanes
  369 |   static_assert(kNumLanes <= HWY_LANES(T), "Too many lanes");
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:369:27: note: the comparison reduces to '(16 <= 1)'
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h: In instantiation of 'struct hwy::N_SCALAR::Simd<unsigned char, 16, 0>':
../deps/v8/src/json/json-stringifier.cc:3379:29:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendStringSIMD(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'

sxa avatar Dec 05 '25 14:12 sxa

and for main I'm getting:

In file included from ../deps/v8/third_party/highway/src/hwy/ops/scalar-inl.h:24,
                 from ../deps/v8/third_party/highway/src/hwy/highway.h:722,
                 from ../deps/v8/src/json/json-stringifier.cc:10:
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h: In instantiation of 'struct hwy::N_SCALAR::detail::FixedTagChecker<unsigned char, 16>':
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:423:7:   required by substitution of 'template<class T, long unsigned int kNumLanes> using hwy::N_SCALAR::FixedTag = typename hwy::N_SCALAR::detail::FixedTagChecker::type [with T = unsigned char; long unsigned int kNumLanes = 16]'
  423 | using FixedTag = typename detail::FixedTagChecker<T, kNumLanes>::type;
      |       ^~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3379:29:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendStringSIMD(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3379 |   hw::FixedTag<SrcChar, 16> tag;
      |                             ^~~
../deps/v8/src/json/json-stringifier.cc:3316:28:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendString(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3316 |     return AppendStringSIMD(chars, length, no_gc);
      |            ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:2531:17:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::SerializeString(v8::internal::Tagged<v8::internal::HeapObject>, const v8::internal::DisallowGarbageCollection&) [with StringT = v8::internal::SeqOneByteString; Char = unsigned char; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 2531 |     AppendString(chars, length, no_gc);
      |     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:2554:47:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::TrySerializeSimpleObject(v8::internal::Tagged<v8::internal::Union<v8::internal::Smi, v8::internal::HeapNumber, v8::internal::BigInt, v8::internal::String, v8::internal::Symbol, v8::internal::Boolean, v8::internal::Null, v8::internal::Undefined, v8::internal::JSReceiver> >) [with Char = unsigned char]'
 2554 |       return SerializeString<SeqOneByteString>(obj, no_gc);
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3167:38:   required from 'v8::internal::FastJsonStringifierResult v8::internal::FastJsonStringifier<Char>::SerializeObject(v8::internal::Tagged<v8::internal::Union<v8::internal::Smi, v8::internal::HeapNumber, v8::internal::BigInt, v8::internal::String, v8::internal::Symbol, v8::internal::Boolean, v8::internal::Null, v8::internal::Undefined, v8::internal::JSReceiver> >, const v8::internal::DisallowGarbageCollection&) [with Char = unsigned char; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'
 3167 |   FastJsonStringifierResult result = TrySerializeSimpleObject(object);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/json/json-stringifier.cc:3509:43:   required from here
 3509 |       one_byte_stringifier.SerializeObject(*object, no_gc);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:369:27: error: static assertion failed: Too many lanes
  369 |   static_assert(kNumLanes <= HWY_LANES(T), "Too many lanes");
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h:369:27: note: the comparison reduces to '(16 <= 1)'
../deps/v8/third_party/highway/src/hwy/ops/shared-inl.h: In instantiation of 'struct hwy::N_SCALAR::Simd<unsigned char, 16, 0>':
../deps/v8/src/json/json-stringifier.cc:3379:29:   required from 'bool v8::internal::FastJsonStringifier<Char>::AppendStringSIMD(const SrcChar*, size_t, const v8::internal::DisallowGarbageCollection&) [with SrcChar = unsigned char; Char = unsigned char; size_t = long unsigned int; v8::internal::DisallowGarbageCollection = v8::internal::PerThreadAssertScopeEmpty<false, v8::internal::SAFEPOINTS_ASSERT, v8::internal::HEAP_ALLOCATION_ASSERT>]'

This is probably caused by https://github.com/google/highway/commit/f38ee257cd8e8b8c1be0ed6b80ac33f559ef050f , which will treat the gcc compiler as broken if the version is less than 16.0, which is not even released yet. When the gcc compiler is detected as broken, it will fallback to HWY_SCALAR instead of HWY_EMU128 and causing the assertion error.

So one way is to accept that the compiler might do broken stuff and compile anyway with -DHWY_BROKEN_EMU128=0, another way is to use GCC >= 16 or clang.

Link: https://github.com/google/highway/issues/2406#issuecomment-2604122029

kxxt avatar Dec 06 '25 01:12 kxxt

Notes to self:

  • Commit c2843b722ca builds ok with the cross-compiler and is possibly the last one to do so.
  • The subsequent V8 change in https://github.com/nodejs/node/pull/60111 doesn't work (albeit seemingly not with the same error that we now get in HEAD)
  • HEAD builds with GCC14 cross-compiler seem to build ok if build with CXXFLAGS=-DHWY_BROKEN_EMU128=0 as per the comment above
  • Raised V8 backport https://github.com/nodejs/node/pull/60989 to resolve the build problems with v24.x

sxa avatar Dec 06 '25 22:12 sxa

Initial test failure list

Failures on v25.x on TH1520

out/Release/node /home/sxa/node/test/sea/test-single-executable-application-empty.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-esm-detect-ambiguous.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-esm-loader-entry-url.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-esm-tla-syntax-errors-not-recognized-as-tla-error.mjs out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-typescript-commonjs.mjs out/Release/node /home/sxa/node/test/sea/test-single-executable-application-snapshot-and-code-cache.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-typescript-eval.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-typescript-transform.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/es-module/test-typescript.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-assert-partial-deep-equal.js out/Release/node --expose_gc --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-abortsignal-drop-settled-signals.mjs out/Release/node /home/sxa/node/test/parallel/test-buffer-indexof.js out/Release/node /home/sxa/node/test/parallel/test-compile-cache-typescript-commonjs.js out/Release/node /home/sxa/node/test/parallel/test-compile-cache-typescript-strip-miss.js out/Release/node /home/sxa/node/test/parallel/test-compile-cache-typescript-transform.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-config-file.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-module-strip-types.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-node-output-eval.mjs out/Release/node /home/sxa/node/test/parallel/test-repl-paste-big-data.js out/Release/node /home/sxa/node/test/parallel/test-runner-cli.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-runner-global-setup-teardown.mjs out/Release/node /home/sxa/node/test/parallel/test-snapshot-reproducible.js out/Release/node /home/sxa/node/test/parallel/test-util-getcallsites.js out/Release/node /home/sxa/node/test/parallel/test-worker-syntax-error.js out/Release/node --expose-internals /home/sxa/node/test/sequential/test-worker-heapsnapshot-options.js

Failures on bpi-F3 on Node 24

out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/report/test-report-fatalerror-oomerror-set.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/report/test-report-fatalerror-oomerror-compact.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/report/test-report-fatalerror-oomerror-filename.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-repl-paste-big-data.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-runner-run.mjs out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-snapshot-reproducible.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-strace-openat-openssl.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-stream2-read-sync-stack.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-worker-resource-limits.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/abort/test-abort-fatal-error.js out/Release/node --expose-internals --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-worker-heapsnapshot-options.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-asset-keys.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-asset-keys-empty.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-assets.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-assets-raw.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-disable-experimental-sea-warning.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-empty.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-exec-argv.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-exec-argv-empty.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-cli.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-env.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-none.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-inspect.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-inspect-in-sea-flags.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-snapshot.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-snapshot-and-code-cache.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-snapshot-worker.js out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sea/test-single-executable-application-use-code-cache.js

(Edited to add the following ones after the initial results above)

v22.x on BPiF3
Failed tests:
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-snapshot-reproducible.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-strace-openat-openssl.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-worker-messaging.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-asset-keys.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-asset-keys-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-assets.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-assets-raw.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-cli.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-env.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-none.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-inspect.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-inspect-in-sea-flags.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot-and-code-cache.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot-worker.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-use-code-cache.js
out/Release/node --expose-internals --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-worker-heapsnapshot-options.js
out/Release/node --expose-internals --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-write-heapsnapshot-options.js
v22.x on BPiF3 with backports from the next comment

Note: cherry-picked commits are cdc3ca8a7ed and 22a3eb00e85 and only affect the tests:

[139:10|% 100|+ 4631|-  23]: Done                                             

Failed tests:
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/report/test-report-fatalerror-oomerror-filename.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-child-process-exec-maxbuf.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-snapshot-reproducible.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/parallel/test-worker-messaging.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-asset-keys.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-asset-keys-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-assets.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-assets-raw.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-empty.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-cli.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-env.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-exec-argv-extension-none.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-inspect.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-inspect-in-sea-flags.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot-and-code-cache.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-snapshot-worker.js
out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-single-executable-application-use-code-cache.js
out/Release/node --expose-internals --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/sxa/node/test/sequential/test-worker-heapsnapshot-options.js

Noting that while the SEA tests fail consistently, the others are a bit more variable. `parallel/test-net-pingpong.js`, `parallel/test-worker-messaging.js`, `parallel/test-child-process-exec-maxbuf.js`, `sequential/test-get-heapsnapshot-options.js` and `test-snapshot-reproducible.js` and `sequential/test-worker-heapsnapshot-options.js` have all failed at least one one this build.

v25.x-staging (commit c57a40c898c) on bpiF3
[52:44|% 100|+ 4889|-  30]: Done                                              

Failed tests:
out/Release/node /home/sxa/node/test/report/test-report-fatalerror-oomerror-directory.js
out/Release/node /home/sxa/node/test/report/test-report-fatalerror-oomerror-compact.js
out/Release/node /home/sxa/node/test/report/test-report-fatalerror-oomerror-filename.js
out/Release/node /home/sxa/node/test/async-hooks/test-tlswrap.js
out/Release/node /home/sxa/node/test/parallel/test-performance-many-marks.js
out/Release/node /home/sxa/node/test/parallel/test-repl-paste-big-data.js
out/Release/node /home/sxa/node/test/parallel/test-snapshot-reproducible.js
out/Release/node /home/sxa/node/test/parallel/test-stream2-read-sync-stack.js
out/Release/node /home/sxa/node/test/parallel/test-trace-events-fs-sync.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-asset-keys-empty.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-assets.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-asset-keys.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-disable-experimental-sea-warning.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-assets-raw.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-empty.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-inspect.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-cli.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-snapshot-and-code-cache.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-inspect-in-sea-flags.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-env.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-snapshot.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv-extension-none.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-exec-argv-empty.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-snapshot-worker.js
out/Release/node /home/sxa/node/test/sea/test-single-executable-application-use-code-cache.js
out/Release/node /home/sxa/node/test/node-api/test_sea_addon/test.js
out/Release/node /home/sxa/node/test/abort/test-abort-fatal-error.js
out/Release/node --expose-internals /home/sxa/node/test/sequential/test-worker-heapsnapshot-options.js

(Noting for my own reference that the BPiF3 (SpacemiT-K1) takes about 45 minutes to run the v22 test suite, excluding test-doc. That included timeouts - probably due to a crash - on the single-executable-application tests)

sxa avatar Dec 12 '25 16:12 sxa

I remember that on SG2042, nodejs 25.2.1 with https://github.com/nodejs/node/pull/60591 and https://github.com/nodejs/node/pull/60588 applied passed all tests except test-snapshot-reproducible.js, which is currently being tracked upstream at https://issues.chromium.org/issues/460332153

kxxt avatar Dec 13 '25 01:12 kxxt

Thanks @kxxt I'll take a look at those since I haven't run tests with those included yet and some of the failures were OOMs which could be related to 60591. Was your SG2042 the Milk-V Pioneer or a different board?

sxa avatar Dec 13 '25 11:12 sxa

Thanks @kxxt I'll take a look at those since I haven't run tests with those included yet and some of the failures were OOMs which could be related to 60591. Was your SG2042 the Milk-V Pioneer or a different board?

Yes. It's a Milk-V Pioneer that I could access remotely(Thanks to felixonmars!). Unfortunately there is a hard-to-debug problem(https://github.com/revyos/revyos/issues/27) specific to that board that could cause node.js to segfault sometimes, which happens sometimes during tests.

There is also bug in old vendor kernel(5.10.x) for TH1520, which could cause weird issues for node.js. That is also mentioned in https://github.com/revyos/revyos/issues/27 (The case of lpi4a).

kxxt avatar Dec 13 '25 11:12 kxxt

I had remote access to someone else's Pioneer too at one point but it's not available now. Mine are running a 5.10-based kernel from Ubuntu 24.04 so that link is very useful. It is about time I updated my lpi4a though so I should probably get hold of one of the later kernels as you suggested. I do worry about how reliable the C910/C920 cores are though as we've seen unusual crashes with java on systems with those cores. I'll perhaps need to do a direct compare with the same build on bpiF3 and TH1520 and see if they give the same results, but I've been building different versions on each so far.

sxa avatar Dec 13 '25 18:12 sxa

I remember that on SG2042, nodejs 25.2.1 with https://github.com/nodejs/node/pull/60591 and https://github.com/nodejs/node/pull/60588 applied passed all tests except test-snapshot-reproducible.js,

@kxxt Did you have to do anything special to get the single executable appliation tests in test/sea to pass? On a TH1520 with 25.x which includes those two commits I'm getting SIGILLs (Could it be trying to run RVV1.0 stuff? Doesn't look like node's v8-options lets you disable those) and elsewhere (e.g. under qemu or on the bpiF3) I'm still getting consistent segmentation faults. (EDIT: These have passed in some runs in the TH1520, but I'm not yet sure what was special about those!)

sxa avatar Dec 17 '25 10:12 sxa

I remember that on SG2042, nodejs 25.2.1 with nodejs/node#60591 and nodejs/node#60588 applied passed all tests except test-snapshot-reproducible.js,

@kxxt Did you have to do anything special to get the single executable appliation tests in test/sea to pass? On a TH1520 with 25.x which includes those two commits I'm getting SIGILLs (Could it be trying to run RVV1.0 stuff? Doesn't look like node's v8-options lets you disable those) and elsewhere (e.g. under qemu or on the bpiF3) I'm still getting consistent segmentation faults. (EDIT: These have passed in some runs in the TH1520, but I'm not yet sure what was special about those!)

I don't think I have done anything special for those tests. But the SIGILLs might be related to RVV 1.0 stuff in highway. It would be a better idea to confirm it in gdb. Because RVV runtime dispatch is broken in highway(https://github.com/google/highway/blob/4262db0ef703c7a3372f7a921a7b69ffd5db5829/hwy/detect_targets.h#L784 , note the && 0 at the end), IIRC it would unconditionally enable RVV. So as a distribution targeting rv64gc without V extension, we disable RVV completely in highway with a patch https://github.com/felixonmars/archriscv-packages/blob/master/nodejs-lts-krypton/hwy-broken-rvv.diff I could open a PR for that patch if you think that's the reasonable default. But I bet folks from ubuntu targeting rva23 profile (with V extension included) would not want it.

Here is a build and test log for 24.11.1: https://archriscv.felixc.at/.status/log.htm?url=logs/nodejs-lts-krypton/nodejs-lts-krypton-24.11.1-1.log (With the patches in https://github.com/felixonmars/archriscv-packages/tree/master/nodejs-lts-krypton)

kxxt avatar Dec 18 '25 04:12 kxxt

That's useful information. Given that there are multiple failures on different hardware here I've raised another issue on this and will put excludes in for RISC-V on the SEA tests (which is an experimental feature just now anyway and not looking like it's going to be anything else in the meantime). We can look at doing further debugging on this in the new issue.

we disable RVV completely in highway with a patch https://github.com/felixonmars/archriscv-packages/blob/master/nodejs-lts-krypton/hwy-broken-rvv.diff

Was your passing test suite done with that patch applied on the SG2042?

I'll put some more results in the issue for information but I have successfully been able to run the SEA tests using the build from the TH1520 under qemu on my x64 laptop, but sine they will fail on most people's boards I think it's fair to exclude them for now.

I could open a PR for that patch if you think that's the reasonable default. But I bet folks from ubuntu targeting rva23 profile (with V extension included) would not want it.

I agree. Ideally we'd have this as a runtime switch (or have highway detect it in a better way) so I think I'm ok with leaving the default as-is for now and just disabling the tests.

sxa avatar Dec 18 '25 10:12 sxa

we disable RVV completely in highway with a patch https://github.com/felixonmars/archriscv-packages/blob/master/nodejs-lts-krypton/hwy-broken-rvv.diff

Was your passing test suite done with that patch applied on the SG2042?

Yes. IIRC when targeting rv64gc with -march=rv64gc and using clang, node.js would throw build errors in highway without that patch.

kxxt avatar Dec 18 '25 12:12 kxxt