oven-sh / bun

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

Bun crashed on a long-running script #11184

Open bojanrajkovic opened 4 months ago

bojanrajkovic commented 4 months ago

How can we reproduce the crash?

I have a script that runs for a long while, looking for files that match each other in a directory, and offering to create hardlinks between them, even if the filenames don't match. It's been running in a tmux session for a few hours, with me periodically attaching to the session and advancing the script a bit at a time.

JavaScript/TypeScript code that reproduces the crash?

https://gist.github.com/bojanrajkovic/00b7a17f9210eda5d0e693ce0ba00b86 — apologies for the quality of this code, it's extremely quick-and-dirty.

Relevant log output

a allocator = 0x7f744e0274e8
allocator->scavenger_data.kind = allocator
allocator->scavenger_data.is_in_use = yes
at time of assert: allocator->scavenger_data.is_in_use = yes
============================================================
Bun v1.1.8 (89d25807) Linux x64
Args: "/nas/homes/brajkovic/.bun/bin/bun", "fixup-hardlinks.ts"
Features: jsc Bun.stdin(2) Bun.stdout 
Builtins: "bun:main" "node:fs" "node:fs/promises" "node:path" "node:process" "node:readline/promises" "node:string_decoder" "node:util/types" 
Elapsed: 3351180ms | User: 43494ms | Sys: 21047ms
RSS: 0.95GB | Peak: 0.31GB | Commit: 0.95GB | Faults: 28296

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

Stack Trace (bun.report)

Bun v1.1.8 (89d2580) on linux x86_64 [AutoCommand]

Illegal instruction at address 0x5642E0ACE208

github-actions[bot] commented 1 month ago

This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment.