Skip to content

Segmentation Fault Crash on MacOS #11154

Closed
@xela7

Description

@xela7

How can we reproduce the crash?

install bun 1.1.8 globally on macOSX 14.1.1

I suspect that the wrong binary file is being installed for some reason -- see the refernce to the .exe in the logs.

JavaScript/TypeScript code that reproduces the crash?

the following generates the crash:
bun test/health-api.test.ts

import type { OpenAPIHono } from "@hono/zod-openapi";
import { beforeAll, describe, expect, test } from "bun:test";

import application from "../src/index";

describe("misc routes", () => {
  let app: OpenAPIHono;

  beforeAll(() => {
    app = application.app;
  });

  test("GET /health", async () => {
    const res = await app.request("/health");
    expect(res.status).toBe(200);
    expect(await res.text()).toBe("OK");
  });
});

the following works:
bun test/test.test.ts

console.log("Bun is working!");


### Relevant log output

```shell
bun test test/health-api.test.ts 
bun test v1.1.8 (89d25807)

test/health-api.test.ts:
============================================================
Bun v1.1.8 (89d25807) macOS x64
Args: "/Users/alex/.pnpm/global/5/node_modules/bun/bin/bun.exe", "test", "test/providers-api.test.ts"
Features: jsc dotenv transpiler_cache(7) tsconfig(16) 
Builtins: "node:assert" "node:buffer" "node:crypto" "node:dns" "node:events" "node:fs" "node:module" "node:net" "node:os" "node:path" "node:string_decoder" "node:tty" "node:url" "node:util" "node:util/types" "node:worker_threads" 
Elapsed: 335ms | User: 278ms | Sys: 135ms
RSS: 94.99MB | Peak: 94.99MB | Commit: 1.07GB | Faults: 2194

panic(main thread): Segmentation fault at address 0x1A
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.8/mt189d2580AiogggF___4rm9yCy9t76Byj8mkC4quuoC4m/1e_yo5kzCA2A0B

/Users/alex/.pnpm/bun: line 13: 70212 Illegal instruction: 4  "$basedir/global/5/node_modules/bun/bin/bun.exe" "$@"

Stack Trace (bun.report)

Bun v1.1.8 (89d2580) on macos x86_64 [TestCommand]

Segmentation fault at address 0x0000001A

  • 3 unknown/js code
  • vmEntryToJavaScript
  • JSC::Interpreter::executeCall
  • JSC::runJSMicrotask
  • JSC::VM::drainMicrotasks
  • Bun::jsFunctionReportUncaughtException
  • 1 unknown/js code
  • llint_entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions