Skip to content
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

Bun crashed on a long-running script #11184

Open
bojanrajkovic opened this issue May 19, 2024 · 0 comments
Open

Bun crashed on a long-running script #11184

bojanrajkovic opened this issue May 19, 2024 · 0 comments
Labels
crash An issue that could cause a crash needs repro Needs an example to reproduce

Comments

@bojanrajkovic
Copy link

bojanrajkovic commented May 19, 2024

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

  • ??
  • ld-temp.o:0: pas_thread_local_cache_for_all
  • ld-temp.o:0: bmalloc_heap_config_specialized_local_allocator_try_allocate_small_segregated_slow
  • ld-temp.o:0: bmalloc_try_allocate_auxiliary_impl_casual_case(...)
  • ArgList.h:0: WTF::Detail::CallableWrapper<Bun::signalHandler(...)::$_0, void, WebCore::ScriptExecutionContext&>::call
  • ??
  • ld-temp.o:0: bmalloc_small_segregated_page_config_specialized_local_allocator_try_allocate_in_primordial_partial_view
  • ld-temp.o:0: bmalloc_try_allocate_auxiliary_impl_casual_case
  • ld-temp.o:0: JSC::SharedArrayBufferContents::~SharedArrayBufferContents
  • ld-temp.o:0: JSC::tryAllocateResizableMemory
@bojanrajkovic bojanrajkovic added the crash An issue that could cause a crash label May 19, 2024
@Electroid Electroid added the needs repro Needs an example to reproduce label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash needs repro Needs an example to reproduce
Projects
None yet
Development

No branches or pull requests

2 participants