oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.91k stars 2.74k forks source link

panic(main thread): Segmentation fault at address 0x10 #14800

Open ebachter opened 5 hours ago

ebachter commented 5 hours ago

How can we reproduce the crash?

The error occured on an AWS EC2 instance after executing:

import {drizzle} from 'drizzle-orm/mysql2'; import * as schema from './schema'; import {createConnection} from 'mysql2';

export * from './schema';

let connection; try { connection = createConnection(Bun.env.DB_URL!); } catch (err) { console.error('DB Error:', err); throw 'DB Error'; }

export default drizzle(connection, { schema, mode: 'default', logger: false, });

Probably after adding "throw 'DB Error'."

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.33 (247456b) on linux x86_64 [AutoCommand]

Segmentation fault at address 0x00000010

Features: dotenv https_server jsc transpiler_cache Builtins: "bun:main" "node:async_hooks" "node:buffer" "node:crypto" "node:events" "node:fs" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:zlib" "node:http2" Elapsed: 1120ms | User: 750ms | Sys: 154ms RSS: 0.95GB | Peak: 0.23GB | Commit: 0.95GB | Faults: 380

panic(main thread): Segmentation fault at address 0x10 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......

ebachter commented 4 hours ago

Another possible reason: sudo apt-get install libcap2-bin sudo setcap cap_net_bind_service=+ep readlink -f \which bun``