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 seg faults when running tests #16292

Open
micahbf opened this issue Jan 9, 2025 · 2 comments
Open

Bun seg faults when running tests #16292

micahbf opened this issue Jan 9, 2025 · 2 comments
Labels
bun:test Something related to the `bun test` runner crash An issue that could cause a crash macOS An issue that occurs on macOS runtime

Comments

@micahbf
Copy link

micahbf commented Jan 9, 2025

How can we reproduce the crash?

Unfortunately unable to provide reproduction steps due to private code. However, happy to help troubleshoot and reproduce locally.

Relevant log output

bun test
bun test v1.1.43 (76800b04)
[0.07ms] ".env.test", ".env"

src/assistant/schema.spec.ts:
✓ schema > generates a schema from fields [0.12ms]

src/assistant/prompts.repository.spec.ts:
============================================================
Bun v1.1.43 (76800b04) macOS Silicon
macOS v15.2
Args: "bun" "test"
Features: Bun.stdin(2) bunfig dotenv(2) jsc transpiler_cache(92) tsconfig(118) tsconfig_paths(12) process_dlopen(3)
Builtins: "bun:jsc" "detect-libc" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:constants" "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:process" "node:querystring" "node:readline" "node:stream" "node:string_decoder" "node:timers" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:vm" "node:zlib" "node:worker_threads" "node:punycode" "node-fetch" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
Elapsed: 1592ms | User: 1564ms | Sys: 528ms
RSS: 0.65GB | Peak: 0.65GB | Commit: 0.02ZB | Faults: 57

panic(main thread): Segmentation fault at address 0x5
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.1.43/Mt176800b0iC9r/7//B__utyuf_+6hn1C__un3m1Cur880C2/195BA2AK

zsh: trace trap  bun test

Stack Trace (bun.report)

Bun v1.1.43 (76800b0) on macos aarch64 [TestCommand]

Segmentation fault at address 0x00000005

  • 2 unknown/js code
  • Bun::Process_functionDlopen
  • 1 unknown/js code
  • jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__684_callHelper__dispatch_LowLevelInterpreter64_asm_2538
  • 2 unknown/js code
  • jsc_llint_commonCallOp__llintOpWithMetadata__llintOpWithReturn__llintOp__commonOp__fn__fn__makeReturn__fn__fn__fn__666_callHelper__dispatch_LowLevelInterpreter64_asm_2538
  • llint_call_javascript
  • JSC::Interpreter::executeCall

Features: tsconfig_paths, process_dlopen, Bun.stdin, jsc, transpiler_cache, tsconfig, tsconfig

Sentry Issue: BUN-AY9

@micahbf micahbf added the crash An issue that could cause a crash label Jan 9, 2025
@github-actions github-actions bot added macOS An issue that occurs on macOS runtime labels Jan 9, 2025
@micahbf
Copy link
Author

micahbf commented Jan 9, 2025

Note: same issue occurs on latest canary (Bun Canary v1.1.43-canary.11 (5e003dc) macOS Silicon)

@DonIsaac DonIsaac added the bun:test Something related to the `bun test` runner label Jan 10, 2025
@DonIsaac
Copy link
Contributor

Hi @micahbf, thanks for reporting this. Are you able to narrow down which expectation, test block, etc. the crash is occuring on? And if so, can you provide some high-level details on what's being called?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun:test Something related to the `bun test` runner crash An issue that could cause a crash macOS An issue that occurs on macOS runtime
Projects
None yet
Development

No branches or pull requests

2 participants