Skip to content

tui: Bun 1.4.2 segfault ~5s after idle startup on Linux x64 (v2.0.26) #54228

Description

@devwangting

Summary

The TUI process crashes with a native Bun runtime segmentation fault ~5 seconds after startup on Linux x64, while completely idle (no user input). The background opencode serve --service process is unaffected. opencode 2.0.26 with the bundled Bun 1.4.2 runtime.

Environment

  • opencode version: 2.0.26 (channel: latest)
  • OS: Ubuntu Linux 6.8.0-146-generic x86_64
  • Terminal: TERM=xterm-256color
  • Shell: /bin/bash
  • Install/channel: official installer, ~/.opencode/bin/opencode (standalone Bun executable, 201 MB ELF, not stripped)
  • Active plugins: 12 plugins, including superpowers@git+https://github.com/obra/superpowers.git; MCP servers: chrome-devtools (30 tools, 2 connections)

Reproduction

  1. Have opencode 2.0.26 on Linux x64 with the background service (opencode serve --service) running for >24h.
  2. Launch opencode (TUI) in a project directory.
  3. Do nothing.
  4. ~5 seconds after startup the TUI dies.

Expected Behavior

The TUI stays running.

Actual Behavior

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

 https://bun.report/1.4.2/la1744846fEsgggC+smh0B_yv13vB_i903vBmz93vBi903vBmz93vBi903vBmz93vBi903vBmz93vBi903vBi903vBmz93vBi903vBmz93vByv13vBms1vvB0yu+zBA2gsBwgggU

Segmentation fault (core dumped)

Additional Context

Server-side log timeline (from ~/.local/share/opencode/log/opencode.log), timestamps local:

  • background service had been up since the previous day (unaffected, still running after the crash)
  • 09:52:19 TUI client starts: plugin reconciliation (12 plugins), chrome-devtools MCP connects (30 tools x2), git detection for the project — all normal, no errors
  • 09:52:24 the TUI's /api/event long-poll drops with InterruptError: All fibers interrupted — this is the crash moment, ~5s after launch
  • 09:58 relaunching opencode works fine (this session has been stable since)

Other observations:

Activity

  1. opencode-agent commented on Oct 10, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report and the bun.report link. I tried to reproduce this on 2.0.26 (bundled Bun 1.4.2) on Linux x64. I launched the TUI 60 times in a git project, left each launch idle for about 12 seconds, and had all of them share one background opencode serve --service. The TUI never crashed and the service stayed up.

    The decoded trace points at a JavaScriptCore heap-cell crash (operationDefaultCall during module execution), not at an FFI call. My test environment didn't have several things from your setup, and they may matter:

    • a background service that had been running for more than 24h
    • your 12 plugins and the chrome-devtools MCP server
    • your large opencode.db

    If it happens again, these would help:

    • Whether it still happens with plugins and MCP servers turned off, or right after restarting the background service.
    • The new bun.report link for each crash, so we can see whether the stack is the same every time.
    • A core dump, if you can get one. For example, you could set ulimit -c unlimited and a core_pattern that bypasses apport before launching.

    Related reports, most likely first:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions