Skip to content

Bun crash #20125

@docaohuynhcse

Description

@docaohuynhcse

How can we reproduce the crash?

I using elysia this code is crash

import { Elysia } from "elysia";


import swagger from "@elysiajs/swagger";
const RequestLogger = () =>
  new Elysia({ name: 'request-logger' }).onRequest(async ({ request }) => {
    console.log(`[${new Date().toISOString()}] ${request.method} ${request.url}`)
    // console.log('Headers:', Object.fromEntries(request.headers.entries()))

    try {
      const body = await request.clone().json()
      console.log('Body:', body)
    } catch (e) {
      console.log(e);
      
    }
  })
const app = new Elysia()
.use(swagger()) 
.use(RequestLogger())
.listen({port: 3000, idleTimeout: 255 });

console.log(
  `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
);

Relevant log output

============================================================
Bun v1.2.15 (df017990) Linux x64
Linux Kernel v5.14.0 | glibc v2.34
CPU: sse42 popcnt avx avx2
Args: "./server"
Features: Bun.stderr(2) dotenv http_server jsc standalone_executable tsconfig valkey 
Builtins: "bun:main" "node:assert" "node:buffer" "node:console" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:os" "node:path" "node:process" "node:querystring" "node:stream" "node:stream/web" "node:timers/promises" "node:tty" "node:url" "node:util" "node:zlib" "node:punycode" "undici" 
Elapsed: 53288ms | User: 567ms | Sys: 253ms
RSS: 1.07GB | Peak: 83.00MB | Commit: 1.07GB | Faults: 28

panic(main thread): Segmentation fault at address 0x0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.2.15 (df01799) on linux x86_64 [_]

Segmentation fault at address 0x00000000

Features: tsconfig, valkey, Bun.stderr, dotenv, http_server, jsc, standalone_executable

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crashlinuxAn issue that occurs on Linuxruntime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions