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

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

Open
ebachter opened this issue Oct 24, 2024 · 1 comment
Open

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

ebachter opened this issue Oct 24, 2024 · 1 comment
Labels
crash An issue that could cause a crash linux An issue that occurs on Linux

Comments

@ebachter
Copy link

ebachter commented Oct 24, 2024

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 ebachter added the crash An issue that could cause a crash label Oct 24, 2024
@github-actions github-actions bot added the linux An issue that occurs on Linux label Oct 24, 2024
@ebachter
Copy link
Author

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

@nektro nektro added bug Something isn't working and removed bug Something isn't working labels Oct 26, 2024
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 linux An issue that occurs on Linux
Projects
None yet
Development

No branches or pull requests

2 participants