Skip to content

Node crashes with 'illegal instruction' on old CPUs without AVX support like AMD Opteron 23xx #48700

Description

@karussell

Version

20.4.0 or 16.20.1

Platform

Debian 11

Subsystem

No response

What steps will reproduce the bug?

Find the appropriate hardware and then:

git clone https://github.com/graphhopper/graphhopper-maps
cd graphhopper-maps
npm install
npm run build

=>

 graphhopper-maps@0.0.0 build
 webpack --config webpack.prod.js

Illegal instruction

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

Can be only reproduced on hardware with a AMD Opteron 23xx (Gen 3 Class Opteron).

See this thread for more context. The underlying problem is highly likely that the CPUs have no AVX support.

Unfortunately disabling avx functionality does not seem to work

Can I disable this when compiling node somehow? I only found this but this did not help. Or should I edit deps/v8/src/base/cpu.h and some more files directly?

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

It is expected that "npm run build" succeeds on all CPU including older CPUs without AVX support.

What do you see instead?

npm crashes with just "Illegal instruction".

Additional information

Related to #704 and RocketChat/Rocket.Chat#23938

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions