oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.27k stars 2.77k forks source link

Bun has crashed. This indicates a bug in Bun, not your code. #13462

Open crazytweeks opened 2 months ago

crazytweeks commented 2 months ago

How can we reproduce the crash?

No response

Relevant log output

============================================================
 Bun v1.1.25 (fe62a614) Windows x64
 Windows v.win10_fe
 CPU: sse42 avx avx2
 Args: "E:\bun\flash\node_modules\.bin\\..\bun\bin\bun.exe" "run" "--hot" "src/index.ts"
 Features: jsc fetch(507) http_server transpiler_cache(328) tsconfig_paths(3) tsconfig(21)
 Builtins: "bun:jsc" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:crypto" "node:dns" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:perf_hooks" "node:readline" "node:stream" "node:string_decoder" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:worker_threads" "node:v8" "node:diagnostics_channel"
 Elapsed: 16485995ms | User: 1257640ms | Sys: 620000ms
 RSS: 9.93GB | Peak: 11.12GB | Commit: 27.06GB | Faults: 14604655

 panic(main thread): Segmentation fault at address 0x1C0E4010000
 oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.25 (fe62a61) on windows x86_64 [RunCommand]

Segmentation fault at address 0x1C0E4010000

Jarred-Sumner commented 2 months ago

Do you have any code samples we could take a look at? It looks like we attempted to allocate a lot of memory

nektro commented 1 month ago

this may have just been fixed by https://github.com/oven-sh/bun/pull/14371

crazytweeks commented 4 weeks ago

This happened to me again. Now I know how it happened.

I was running nextjs using bun. And hono using bun on windows 11.

I usually leave it running on vscode terminal. I also have hibernate enabled. So when I close lid, laptop goes to hibernate, (not sleep mode)

When i open, every app will be in as is state, except bun processes sometimes.

This issue is not appearing everytime. But whenever I open laptop and resume my work, I see if bun is already running, it will significantly double the ram usage upon resume.

Maybe it is not supposed to be used with windows hibernate feature. But yeah, this causes crash sometimes. But i was using same with pnpm and yarn. Never had such issues.