Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
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
- 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)
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: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:
- No core dump was captured: Ubuntu apport ignores unpackaged binaries, and
~/.opencode/bin/opencodeis not package-installed. The bun.report link above contains the redacted trace. - Local
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. - 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=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. - Possibly related existing issues: tui: Linux x64 segfault in bundled Bun 1.4.2 (FFI stack), OpenCode 2.0.22 #53214 (bundled Bun 1.4.2 segfault, Linux TUI), serve: Bun 1.4.2 segfault (address 0x3D8) after long uptime on Windows #53688 (Bun 1.4.2 segfault after long uptime, Windows serve), server: v2.0.11 background service segfaults repeatedly (SIGSEGV, Linux x64) #50246 (repeated background service segfaults, Linux x64). This report adds a v2.0.26 / Linux TUI / crash-5s-after-startup data point with the bun.report link.
Metadata
Metadata
Assignees
Labels
No labels
Activity
opencode-agent commentedon Oct 10, 2026
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 (
operationDefaultCallduring module execution), not at an FFI call. My test environment didn't have several things from your setup, and they may matter:opencode.dbIf it happens again, these would help:
ulimit -c unlimitedand acore_patternthat bypasses apport before launching.Related reports, most likely first:
opencode serveon Windows after long uptimeopencode-agent commentedon Oct 13, 2026
I'm closing this for now because we couldn't reproduce it. We ran 60 idle TUI launches on 2.0.26 (bundled Bun 1.4.2, Linux x64) with a shared background service, and none of them crashed. We haven't had the extra details we asked for yet.
If it happens again, please reopen this or comment here. These would help most:
You can also follow #53214 and #50246, which cover related Bun 1.4.2 segfaults on Linux. Thanks for the detailed report.