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

Segmentation Fault Crash on MacOS #11154

Open
xela7 opened this issue May 17, 2024 · 1 comment
Open

Segmentation Fault Crash on MacOS #11154

xela7 opened this issue May 17, 2024 · 1 comment
Labels
crash An issue that could cause a crash

Comments

@xela7
Copy link

xela7 commented May 17, 2024

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
@xela7 xela7 added the crash An issue that could cause a crash label May 17, 2024
@KaiWenRui
Copy link

同样出现了这个问题,不知道如何解决

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
Projects
None yet
Development

No branches or pull requests

2 participants