Skip to content

Getting Node low level errors running vitest #3816

@lemoustachiste

Description

@lemoustachiste

Describe the bug

So I am testing migration of my project from jest to vitest.

But when I run vitest run through npm run test, I keep getting Node errors such as follows:

node(39994,0x7000083d9000) malloc: *** error for object 0x600002c44cd0: pointer being freed was not allocated
node(39994,0x700006fca000) malloc: *** error for object 0x600002c44cd0: pointer being freed was not allocated
node(39994,0x7000083d9000) malloc: *** set a breakpoint in malloc_error_break to debug
node(39994,0x700006fca000) malloc: *** set a breakpoint in malloc_error_break to debug

This error does not even get to a point of running tests.

Or if some tests start running, then they stop unexpectedly with the following error:

[1]    31930 segmentation fault  npm run test

Errors occur with both node 16.20.0 and 18.16.1.

My tests are all TS, so is my project.

Any clue what could be causing this?

Reproduction

Not sure if I can provide a repro at this point.

System Info

System:
    OS: macOS 13.5
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 21.56 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 8.12.1 - ~/work/cert-verifier-js/node_modules/.bin/npm
  Browsers:
    Chrome: 115.0.5790.102
    Safari: 16.6
  npmPackages:
    vitest: ^0.33.0 => 0.33.0

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions