oven-sh / bun

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

Bun crashed with segmentation fault at address 0x2AD498016D40 #13472

Open d521bb85 opened 1 month ago

d521bb85 commented 1 month ago

How can we reproduce the crash?

I have a basic service deployed as a Docker container on the DigitalOcean App Platform using oven/bun. The service acts as a proxy for incoming requests, modifying headers and verifying requests as needed. It relies on the built-in serve function, along with http-status-codes and jsonwebtoken as dependencies. The service is configured to run with BUN_CONFIG_MAX_HTTP_REQUESTS=1024.

The service occasionally encounters segmentation faults, an example of which is provided.

Relevant log output

[service] [2024-08-22 14:21:37] Bun v1.1.25 (fe62a614) Linux x64 (baseline)
[service] [2024-08-22 14:21:37] Linux Kernel v4.4.0 | glibc v2.31
[service] [2024-08-22 14:21:37] CPU: sse42 popcnt avx avx2 avx512
[service] [2024-08-22 14:21:37] Args: "bun" "run" "./src/app.ts"
[service] [2024-08-22 14:21:37] Features: jsc abort_signal(29) fetch(36776) http_server tsconfig 
[service] [2024-08-22 14:21:37] Builtins: "bun:main" "node:assert" "node:buffer" "node:crypto" "node:stream" "node:string_decoder" "node:util" "node:util/types" 
[service] [2024-08-22 14:21:37] Elapsed: 1182885ms | User: 1178060ms | Sys: 19250ms
[service] [2024-08-22 14:21:37] RSS: 0.02ZB | Peak: 0.85GB | Commit: 0.02ZB | Faults: 0

Stack Trace (bun.report)

Bun v1.1.25 (fe62a61) on linux x86_64_baseline [RunCommand]

Segmentation fault at address 0x2AD498016D40

Jarred-Sumner commented 1 month ago

@cirospaciari made an attempt at fixing this in Bun v1.1.26

can you run bun upgrade and try again?