oven-sh / bun

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

Bun crashing upon serving a Bun.file() inside a promise. #12249

Closed KissKonradUni closed 2 months ago

KissKonradUni commented 2 months ago

How can we reproduce the crash?

Have an HTTP webserver. Have a repsonse that uses Bun.file() inside a promise Change the file while the app is running. Refresh the page.

Relevant log output

Bun v1.1.17 (bb66bba1) Windows x64
Args: "C:\ProgramData\chocolatey\lib\bun\tools\bun-windows-x64\bun.exe" "index.ts"
Features: jsc abort_signal dotenv http_server tsconfig 
Builtins: "bun:main" 
Elapsed: 168220ms | User: 109ms | Sys: 15ms
RSS: 0.14GB | Peak: 0.20GB | Commit: 0.21GB | Faults: 101931

panic(main thread): Internal assertion failure
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.17 (bb66bba) on windows x86_64 [RunCommand]

panic: Internal assertion failure

cirospaciari commented 2 months ago

Fixed on https://github.com/oven-sh/bun/pull/12441