You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tui: Bun 1.4.2 segfault ~5s after idle startup on Linux x64 (v2.0.26) #54228
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
Have opencode 2.0.26 on Linux x64 with the background service (opencode serve --service) running for >24h.
Launch opencode (TUI) in a project directory.
Do nothing.
~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)
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:
No core dump was captured: Ubuntu apport ignores unpackaged binaries, and ~/.opencode/bin/opencode is not package-installed. The bun.report link above contains the redacted trace.
Local opencode.db is heavily bloated: 19.4 GB total, 94% of pages on the freelist (page_count=4943277, freelist_count=4633098, page_size=4096; ~42k messages / ~173k parts). Probably unrelated to the crash, but noting it since TUI startup loads session data through the server.
Memory was not constrained: 31 GB RAM total, ~28 GB available at the time.
Frequency: third occurrence overall (twice before today); every time the relaunched session has been stable. Not reproducible on demand.
The background service also appears to crash independently: the log shows background service starting reason=missing entries (2026-10-09), i.e. the service vanished and was auto-relaunched by a client, matching the pattern in server: v2.0.11 background service segfaults repeatedly (SIGSEGV, Linux x64) #50246. The serve PID also silently changed once during use today.
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.
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 --serviceprocess is unaffected. opencode 2.0.26 with the bundled Bun 1.4.2 runtime.Environment
~/.opencode/bin/opencode(standalone Bun executable, 201 MB ELF, not stripped)superpowers@git+https://github.com/obra/superpowers.git; MCP servers: chrome-devtools (30 tools, 2 connections)Reproduction
opencode serve --service) running for >24h.opencode(TUI) in a project directory.Expected Behavior
The TUI stays running.
Actual Behavior
Additional Context
Server-side log timeline (from
~/.local/share/opencode/log/opencode.log), timestamps local:09:52:19TUI client starts: plugin reconciliation (12 plugins), chrome-devtools MCP connects (30 tools x2), git detection for the project — all normal, no errors09:52:24the TUI's/api/eventlong-poll drops withInterruptError: All fibers interrupted— this is the crash moment, ~5s after launch09:58relaunchingopencodeworks fine (this session has been stable since)Other observations:
~/.opencode/bin/opencodeis not package-installed. The bun.report link above contains the redacted trace.opencode.dbis heavily bloated: 19.4 GB total, 94% of pages on the freelist (page_count=4943277,freelist_count=4633098, page_size=4096; ~42k messages / ~173k parts). Probably unrelated to the crash, but noting it since TUI startup loads session data through the server.background service starting reason=missingentries (2026-10-09), i.e. the service vanished and was auto-relaunched by a client, matching the pattern in server: v2.0.11 background service segfaults repeatedly (SIGSEGV, Linux x64) #50246. The serve PID also silently changed once during use today.