-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sentry with profiling is crashing vitest with free(): invalid next size (fast) #4882
Comments
I even recorded a video of a repro Screencast.from.5.1.2024.17.53.35.webm |
The crash in video has different error message. The one I got with the |
FYI I also opened the same bug in sentry repo here: getsentry/profiling-node#228 it seems like it's more likely their fault. They are probably doing all sort of nastyness in the profiling package |
but maybe it would be worth adding some kind of a warning if this nastyness can be detected |
Does it reproduce with |
Sentry's crashes can be reproduced without Vitest. Save this as Node crashes with following errors:
import { Worker, isMainThread } from "node:worker_threads";
import { resolve } from "node:path";
import * as SentryApi from "@sentry/node";
import { ProfilingIntegration } from "@sentry/profiling-node";
if (isMainThread) {
for (const _ of Array(10).fill()) {
new Worker(resolve("./repro.mjs"));
}
} else {
SentryApi.init({
integrations: [new ProfilingIntegration()],
});
} This is similar issue as with Prisma: #3106 As work-around you can use |
Closing this as the root cause is unrelated to Vitest - see above how to crash Sentry with just Node APIs. Below are similar issues where third party modules crashed when ran inside |
Describe the bug
Reproduction
I tried to setup a minimal repro here: https://stackblitz.com/edit/vitest-dev-vitest-1gd3e9?file=src%2Fsentry.ts
but I failed, because profiling integration does not run on stackblitz.
So what you need to do:
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: