ChainSafe / lodestar

🌟 TypeScript Implementation of Ethereum Consensus
https://lodestar.chainsafe.io
Apache License 2.0
1.18k stars 290 forks source link

CompileError: WebAssembly.Module(): Wasm SIMD unsupported #7177

Open wemeetagain opened 2 weeks ago

wemeetagain commented 2 weeks ago

Describe the bug

Hey everyone, I want to switch my beacon and validator node to lodestar but experience an interesting issue with v1.22.0. This is the error I receive:

/usr/app/node_modules/@chainsafe/as-sha256/lib/wasm.js:5
const _module = new WebAssembly.Module(wasmCode_1.wasmCode);
                ^

CompileError: WebAssembly.Module(): Wasm SIMD unsupported @+103
    at Object.<anonymous> (/usr/app/node_modules/@chainsafe/as-sha256/lib/wasm.js:5:17)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)
    at Module._load (node:internal/modules/cjs/loader:1098:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
    at Module.require (node:internal/modules/cjs/loader:1304:12)
    at require (node:internal/modules/helpers:123:16)
    at Object.<anonymous> (/usr/app/node_modules/@chainsafe/as-sha256/lib/index.js:8:16)

Node.js v22.4.1

I just tested docker run chainsafe/lodestar:v1.22.0 --help in the first place in order to compile my compose with the necessary cli flags. I tested my compose and I receive similar errors there. Actually the same error, just stacked multiple times. Did I miss something in the release notes? Is there a breaking change how to run the image or is it really an error in the image? It looks like the build/compilation didn't work properly but I guess you would have seen this in your test pipelines 🤔 .

Short update: I don't have this issue on my local PC. So it looks like that it is VM related (want to start the client on a VM). I will try on my NUC tomorrow and let you know.

See https://discord.com/channels/593655374469660673/593655641445367808/1296836508287893505

Expected behavior

-

Steps to reproduce

No response

Additional context

No response

Operating system

Linux

Lodestar version or commit hash

-

TobiWo commented 2 weeks ago

Hi, I reported this but I didn't open the issue so I need to add the update as a comment:

  1. I tried on another VM and it fails there as well
  2. The Hypervisor in use for both VMs (different self build cloud environments from a friend) is Proxmox VE (was asked by @philknows on Discord)
  3. It runs, as expected, on my AMD barebone
  4. The CPU which is used for the VM is a Intel® Xeon® Gold 6138 (previous CPU generation on the second VM)
  5. This issue is not present with v1.21.0

As I understand, the error indicates that SIMD is not supported (I mean that is what the error states exactly :wink: ) which kind of targets the CPU as reason for the error. On the other hand I'm not sure if this makes sense since SIMD is using the SSE instruction set which is supported by both CPU generations ofc. I'm not an expert on this low level stuff. A more trusting opinion would be helpful. Just let me know if you guys need any additional infos.

Update: I tested it on a public cloud VM as well, with KVM as hypervisor: Works as expected.

ocelot2123 commented 3 days ago

I just updated to v1.22.0 today and got the same error.

I run things through rocketpool through docker mode