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

bug: segmentation fault during running bun test #16923

Open
in-mai-space opened this issue Jan 30, 2025 · 2 comments
Open

bug: segmentation fault during running bun test #16923

in-mai-space opened this issue Jan 30, 2025 · 2 comments
Labels
crash An issue that could cause a crash macOS An issue that occurs on macOS runtime

Comments

@in-mai-space
Copy link

How can we reproduce the crash?

This happened after I created a global mock before running all the tests with bun run test.

import { mock, jest } from "bun:test";
import { MOCK_SIGNED_URL } from "./test-constants";

mock.module("@aws-sdk/s3-request-presigner", () => {
return {
getSignedUrl: jest.fn().mockResolvedValue(MOCK_SIGNED_URL),
};
});

Relevant log output

Bun v1.1.38 (bf2f153f) macOS Silicon
macOS v14.2.1
Args: "bun" "test"
Features: bunfig jsc transpiler_cache(3) tsconfig 
Builtins: "node:path" 
Elapsed: 26ms | User: 28ms | Sys: 16ms
RSS: 61.75MB | Peak: 61.75MB | Commit: 1.07GB | Faults: 109

panic(main thread): Segmentation fault at address 0x725F5F2072617630
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.38/Mt1bf2f153AgkgkggD__ur07jC+5w++Bu+qme+8loe2lpkfu2koe_uukvyCA2gyv9ryDgj7lsyD

task: Failed to run task "test": exit status 133

Stack Trace (bun.report)

Bun v1.1.38 (bf2f153) on macos aarch64 [TestCommand]

Segmentation fault at address 0x725F5F2072617630

  • 2 unknown/js code
  • JSC::VM::hasExceptionsAfterHandlingTraps
  • JSC::JSBoundFunction::create
  • Bun::evaluateCommonJSModuleOnce
  • Bun::JSCommonJSModule::evaluate
  • Bun::fetchCommonJSModule
  • Bun::jsFunctionRequireCommonJS
  • 1 unknown/js code
  • llint_entry

Features: bunfig, jsc, transpiler_cache, tsconfig

Sentry Issue: BUN-BXT

@in-mai-space in-mai-space added the crash An issue that could cause a crash label Jan 30, 2025
@github-actions github-actions bot added macOS An issue that occurs on macOS runtime labels Jan 30, 2025
Copy link
Contributor

@in-mai-space, the latest version of Bun is v1.2.1, but this crash was reported on Bun v1.1.38.

Are you able to reproduce this crash on the latest version of Bun?

bun upgrade

@in-mai-space
Copy link
Author

Segmentation fault still happens after I upgrade it.

Bun v1.2.1 (ce53290) macOS Silicon
macOS v14.2.1
Args: "bun" "test"
Features: bunfig jsc transpiler_cache(3) tsconfig
Builtins: "node:buffer" "node:path" "node:stream" "node:util/types"
Elapsed: 126ms | User: 30ms | Sys: 45ms
RSS: 61.88MB | Peak: 61.88MB | Commit: 1.07GB | Faults: 1321

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 macOS An issue that occurs on macOS runtime
Projects
None yet
Development

No branches or pull requests

1 participant