Skip to content

Too many database requests in macro #22552

@JaredDeanFP

Description

@JaredDeanFP

How can we reproduce the crash?

I was experimenting with bundling infrequently changed database data into a javascript bundle for an ios app to consume, found that it would Seg fault. Commenting out queries at random will get rid of the seg fault, I don't think its related to anything specific about the queries. Attempt at reproduction: https://github.com/JaredDeanFP/bun-bundler My reproduction attempt uses the built in bun:sqlite while the application I actually encountered this on uses mysql2.

Relevant log output

============================================================
Bun v1.2.21 (7c45ed97) macOS Silicon
macOS v15.6.1
CPU: fp aes crc32 atomics
Args: "bun" "--hot" "run" "application/hono.ts"
Features: Bun.stderr(2) dotenv(2) fetch http_server jsc(2) macros(3) transpiler_cache(10) tsconfig(18) tsconfig_paths 
Builtins: "bun:main" "node:assert" "node:buffer" "node:child_process" "node:crypto" "node:events" "node:fs" "node:http" "node:https" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:stream" "node:string_decoder" "node:timers" "node:tls" "node:tty" "node:url" "node:util" "node:zlib" "node:worker_threads" "node:http2" 
Elapsed: 6614ms | User: 750ms | Sys: 223ms
RSS: 0.46GB | Peak: 0.46GB | Commit: 0.65GB | Faults: 286 | Machine: 51.54GB

panic: Segmentation fault at address 0x1000001B8
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.2.21/Mr17c45ed94Biwk0gE_unqoF2/7xS226xSms8xS2zyySui6xSm5trR+ir5P+tl5TA2Cwb

error: script "start:dev" was terminated by signal SIGTRAP (Trace or breakpoint trap)

Process finished with exit code 133 (interrupted by signal 5:SIGTRAP)

Stack Trace (bun.report)

Bun v1.2.21 (7c45ed9) on macos aarch64 [RunCommand]

panic: Expected property key

Features: transpiler_cache, tsconfig, tsconfig_paths, Bun.stderr, dotenv, fetch, http_server, jsc, macros

Metadata

Metadata

Assignees

No one assigned

    Labels

    bun --hotcrashAn issue that could cause a crashmacOSAn issue that occurs on macOSmacros

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions