Skip to content

npm crashes with double free or corruption (out) on aarch64 Linux using Node.js v24.14.0 (linux-arm64) #9118

@Latebloomingcrabapple

Description

@Latebloomingcrabapple

Body:

Environment

Field Value
Node.js version v24.14.0
npm version (bundled with Node.js v24.14.0)
OS / Arch Linux aarch64
Package node-v24.14.0-linux-arm64

Description

On aarch64 Linux, running npm commands consistently triggers a fatal memory error:

⠇ double free or corruption (out)
Aborted (core dumped)

This crash appears to occur during npm's internal operations (e.g., npm install, npm run, etc.) and renders most Node.js projects unusable. The only workaround found so far is manually clearing the npm cache before each run, which is not a sustainable solution.


Steps to Reproduce

  1. Download and install node-v24.14.0-linux-arm64 on an aarch64 Linux machine.
  2. Navigate to any Node.js project directory.
  3. Run any npm command, e.g.:
    npm install
  4. Observe the crash output with double free or corruption (out).

Expected Behavior

npm commands should execute normally without memory corruption errors.


Actual Behavior

npm crashes with a double free or corruption (out) error on every invocation. The process aborts with a core dump. Manually running npm cache clean --force before each command temporarily mitigates the issue, but the crash recurs on the next npm invocation.


Workaround (temporary)

npm cache clean --force
npm install  # run again after clearing cache

This is required before every npm invocation and is not a viable long-term fix.


Additional Context

  • The issue is reproducible consistently on aarch64; it has not been tested on x86_64.
  • The crash resembles a heap corruption issue, possibly related to memory allocator behavior differences on ARM64.
  • Suspect this may be related to a glibc version incompatibility or a memory allocator bug specific to the arm64 build of Node.js v24.

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