Skip to content

Segmentation Fault in Bun v1.3.5 on Windows 10 x64 During Opencode Execution #26026

Open

Description

@mynameistito

Running OpenCode with the these plugins, on a codebase;

  "plugin": [
    "opencode-antigravity-auth@latest",
    "@franlol/opencode-md-table-formatter@latest", 
    "@mohak34/opencode-notifier@latest"
  ],

How can we reproduce the crash?

Bun crashes with a segmentation fault at address 0xFFFFFFFFFFFFFFFF when running a command involving opencode.exe. This occurs on Windows x64 and is indicated as a bug in Bun, not user code. The crash happens intermittently, potentially during file operations, hot-reloading, or server/dev mode.

This seems similar to existing issues like #25798 (segfault at 0x0 with opencode-ai in Next.js), #21314 (segfault in SvelteKit dev), and #21286 (segfault in Express.js with CSS watcher). If this is a duplicate, please close and link accordingly.

Environment

  • Bun Version: 1.3.5 (commit: 1e86ceb)
  • OS: Windows 10
  • Terminal: Warp
  • Project Type: Appears to involve Node modules, VSCode integration (node_modules\vscode-windows-x64\bin\opencode.exe), and possibly a web dev framework (e.g., React/Next.js based on args)

Steps to Reproduce

  1. Install Bun v1.3.5 on Windows x64.
  2. Set up a project with dependencies including opencode or similar AI tools (e.g., via VSCode extension).
  3. Run a command like: bun run dev or execute opencode.exe with args such as --user-agent=opencode/1.1.15 --use-system-ca -- l+p.
  4. Perform actions that trigger file reads/writes, hot-reloading, or server operations.
  5. Observe the crash after some elapsed time (in this case, ~755s runtime).

(Note: Exact repro might be intermittent; happens during development workflows.)

Expected Behavior

Bun should handle the operation without crashing, continuing to run the server or script.

Actual Behavior

Bun panics with: panic(thread 21284): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
Followed by: Oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Relevant log output

bun v1.3.5 (1e86cebd) Windows x64 (baseline)
CPU: sse4.2 avx avx2
Windows v. win10 cuHaiku 4.5 (Latest) Anthropic
Args: "C:\Users\mynameistito\node_modules\vscode-windows-x64\bin\opencode.exe" "--user-agent=opencode/1.1.15" "--use-system-ca" "--" "l+p"
Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(8) bunfig dotnev(2) fetch(148) http_server jsc_shell(408) spawn(268) standalone_executable transpiler_cache(5) tsconfig(3) tsx(1)
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:constants" "node:crypto" "node:events" "node:fs" "node:fs/promises" "node:http" "node:https" "node:module" "node:net" "node:os" "node:path" "node:process" "node:querystring" "node:readline" "node:repl" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:util/types" "node:v8" "node:vm" "node:wasi" "node:worker_threads" "node:zlib" "undici" "node:dgram"
Elapsed: 755490ms | User: 62984ms | Sys: 10437ms
RSS: 1.15GB | Peak: 1.60GB | Commit: 1.37GB | Faults: 1239762 | Machine: 34.30GB
panic(thread 21284): Segmentation fault at address 0xFFFFFFFFFFFFFFFF
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:
/bun.report/1.3.5/ea1e186cecbm3Gzq339/D4w1w1we4/13mBgjr4uBwOv6uBk13pvB2/OpvB860ovB11tCovB67mzvB2wytwBk01pvBy53nvBg48wYqz4c61mxoQBgB62z1sBwy1sBA2DD

Stack Trace (bun.report)

not sure where to acquire this.

AI transcription of a screenshot / analysis: screenshot in mention below;

Image

Activity

  1. github-actions commented on Jan 12, 2026

    @github-actions
    Contributor

    Found 3 possible duplicate issues:

    1. Segmentation fault at address 0x0 on Windows x64 baseline in Bun v1.3.5 during opencode-ai execution #25798
    2. Segmentation fault at address 0xFFFFFFFFFFFFFFFF #24694
    3. Segmentation fault at address 0xFFFFFFFFFFFFFFFF #24708

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. mynameistito commented on Jan 13, 2026

    @mynameistito
    Author

    Issue seems to persist on 1.3.6 too.

  3. zhao004 commented on Jan 31, 2026

    @zhao004

    The same problem exists in version 1.3.8.

    Image Image
  4. Ayymoss commented on Jan 31, 2026

    @Ayymoss

    Similarly, I'm getting segfault issues with OpenCode during execution. Agents seem to run for about 2-5 minutes, then segfault.

    Windows 11 x64 (25H2 - 26200.7705)
    PowerShell 7.5.4
    Bun 1.3.8
    npm 11.6.2
    Windows Terminal

    https://bun.report/1.3.5/ea11e86cebmzGz+3/9/D_+wlwekhlwe4/i3nBuzqwzBmv3vzB6ivtzBsputzB8l35uBmo8hwB837hwBozhk5Byngk5Bw863TwptmSs4l3uBsykyuBonmwc2nowmB+lwvcA2w5Bg0g4j4B

    Image
  5. narukeu commented on Jan 31, 2026

    @narukeu

    The same problem exists in version 1.3.8.

    Image Image

    This class of bugs in Bun has been around forever. Merging PRs meant to fix them doesn't seem to help at all. 这类 bug 我感觉很久之前就出现了,但修复这类 bug 的 PR 被合并了都没怎么解决这类问题。

  6. ThatDragonOverThere commented on Feb 27, 2026

    @ThatDragonOverThere

    Same crash family here. We've documented 49 crashes in 33 days with Bun v1.3.10 on Windows — 30 today alone. Filed a comprehensive report at #27471 with:

    • WinDbg memory dumps showing N-API vtable corruption
    • Orphan process kill logs (crashed Bun processes stay alive at 1GB+ RAM each)
    • 5 full computer lockups from orphaned process memory exhaustion
    • Terminal state machine corruption (CSI focus codes dumped as shell commands)
    • 90 affected downstream users across 20+ issues on anthropics/claude-code

    The crash persists across Bun v1.3.1 through v1.3.10 on Windows x86_64.

  7. narukeu commented on Feb 27, 2026

    @narukeu

    @Jarred-Sumner

    Please take this seriously. I’ve mentioned this in issues #26625 and #26660, and from the feedback, I am far from the only one -- the authors of those issues are also reporting this.

    Since Bun is the next-gen runtime aiming to replace Node.js, stability is the first. Currently, there are 4.8k open issues, including this one which has lacked a proper solution for a long time. In my opinion, resolving stability is much more important than Bun being "faster" or having "more features." A JS runtime must eventually face enterprise production environments. As a Bun user, I urge you to prioritize product quality and stability.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashAn issue that could cause a crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions