Skip to content

Bun 1.3.14 segfault (null deref) on file read #6

Description

@gilanx04

Bug Report

Symptom

Opencode v1.17.3 often stuck at "reading file" for ~3 min, then crashes with Bun segfault.

Error log

Bun v1.3.14 (0d9b296a) Linux arm64
Linux Kernel v6.1.138 | glibc v2.42-0 9router
CPU: neon fp aes crc32 atomics sve
Elapsed: 174332ms | User: 113956ms | Sys: 19535ms
RSS: 0.15GB | Peak: 0.66GB | Commit: 0.15GB | Faults: 0 | Machine: 11.87GB

panic: Segmentation fault at address 0x13CB0
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

https://bun.report/1.3.14/La10d9b296myHz/3/9/Dmw2wqE+lEm1hhmD+hngmD+hoL+umS+goS2t66B+ytiB2568BA2Agr+E

Root cause analysis

  • Crash is Bun runtime segfault (0x13CB0 = null pointer deref), not OpenCode logic
  • 174s hang before crash = "stuck at reading file"
  • Peak RSS 0.66GB — memory pressure from file read code paths (v1.17.0 fff-backed search) triggers Bun bug
  • Upstream issue #32237: file reads retain search state causing memory growth

Related

Request

  • Rebuild with newer Bun runtime or repackage OpenCode v1.17.4+
  • Or patch to avoid code path triggering null deref

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions