Skip to content

Bun has crashed #8785

Closed as not planned
Closed as not planned

Description

@sunnywuco

Description

     ┃  ============================================================

Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
Windows v.win10_cu ┃ Build Big Pickle OpenCode Zen
CPU: sse42 avx avx2 avx512 ╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Args: "C:\Users\otiswu\AppData\Local\nvm\v20.10.0\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe" "--user-agent=opencode/1.1.19" "--use-system-ca " "--"
Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) fetch(3) jsc shell(2) spawn(7) standalone_executable workers_spawned
Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "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:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node:v8" "node:dgram"
Elapsed: 10626ms | User: 4593ms | Sys: 1625ms
RSS: 0.77GB | Peak: 0.77GB | Commit: 0.91GB | Faults: 228926 | Machine: 25.77GB

panic(thread 25644): Segmentation fault at address 0x23544190000
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:
~ 1.1.19
https://bun.report/1.3.5/ea11e86cebmQz/3/9/DCYKERNEL32.DLL8jvFCoBMozartBreathCore.dll01hzCCoBMozartBreathCore.dll41t0CCoBMozartBreathCore.dlly730CCoBMozartBreathCore.dll6/g0CCqBMozartBreathBolo2.dll4jlICqBMozartBreathBolo2.dllmiuMCoBMozartBreathCore.dlluz/kECoBMozartBreathCore.dll8+xlEo6z2uBi4zrD+n1of2hhgf__0shkwCA2qjBgggkjkC

Plugins

No response

OpenCode version

1.1.19

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

Windows10

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jan 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. andrey-pavlenko commented on Jan 16, 2026

    @andrey-pavlenko

    The same problem occurs in Arch Linux. Opencode was installed from the AUR https://aur.archlinux.org/packages/opencode-bin.

    Bun v1.3.5 (1e86cebd) Linux x64 (baseline)
    Linux Kernel v6.18.5 | glibc v2.42
    CPU: sse42 popcnt avx avx2
    Args: "opencode" "--user-agent=opencode/1.1.23" "--use-system-ca " "--"
    Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) dotenv fetch(6) jsc shell(22) spawn(13) standalone_executable tsconfig(2) workers_spawned napi_module_register process_dlopen 
    Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:dns" "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:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram" 
    Elapsed: 152370ms | User: 5835ms | Sys: 2905ms
    RSS: 5.29GB | Peak: 2.43GB | Commit: 5.29GB | Faults: 803 | Machine: 50.27GB
    
    panic(main thread): Segmentation fault at address 0x7F75140202A7
    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.3.5/Ba11e86cebmyGzu3/9/Dk0iruE+syP4lrhBin4gB26vc4nthB__y9us/Dy9us/Dy9us/Dy9us/D_y9us/D8mms/D_y9us/D_0rsk/Dqli3jFA2q3/BuqhogU
    
  3. n-pll commented on Jan 26, 2026

    @n-pll

    I encountered the same error in multiple versions. It still exists in the latest version (1.1.36). There is information that upgrading the bun to 1.3.6 can solve it.

    Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
    Windows v.win10_rs5 Z.AI Coding Plan /E:\project\oh-my-opencode:dev
    Args: "C:\Users\aiguo\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe" "--user-agent=opencode/1.1.36" "--use-system-ca " "--"▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
    Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) bunfig fetch(303) jsc no_avx2 no_avx shell(698) spawn(385) standalone_executable transpiler_cache(4) tsconfig(4) workers_spawned(2) napi_module_register process_dlopen ode 1.1.36
    Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:constants" "node:crypto" "node:dns" "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:readline/promises" "node:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "node:worker_threads" "undici" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
    Elapsed: 1529861ms | User: 17468ms | Sys: 6421ms
    RSS: 1.26GB | Peak: 1.26GB | Commit: 1.63GB | Faults: 632771 | Machine: 34.19GB

    CPU lacks AVX support. Please consider upgrading to a newer CPU.
    panic(thread 41960): Segmentation fault at address 0x4A2B21E0160
    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.3.5/ea11e86cebmzGz63/9f_+wlwekhlwe4/i3nB06twzB063vzB6ivtzBsputzB8l35uB80tiwB+itiwBuisiwB0vm3nB89/7qBy8/8e___A2kqChq/n8tC

  4. erskingardner commented on Jan 29, 2026

    @erskingardner

    Same on macos too with opencode v1.1.42

    Bun v1.3.5 (1e86cebd) macOS Silicon
    macOS v26.1
    CPU: fp aes crc32 atomics
    Args: "opencode" "--user-agent=opencode/1.1.42" "--use-system-ca " "--"
    Features: Bun.stderr(4) Bun.stdin(4) Bun.stdout(4) abort_signal(2) fetch(17) jsc shell(14) spawn(13) standalone_executable transpiler_cache(4) tsconfig workers_spawned napi_module_register(2) process_dlopen(3) exited
    Builtins: "bun:ffi" "bun:main" "node:assert" "node:async_hooks" "node:buffer" "node:child_process" "node:console" "node:crypto" "node:dns" "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:stream" "node:string_decoder" "node:timers" "node:timers/promises" "node:tls" "node:tty" "node:url" "node:util" "undici" "node:v8" "node:http2" "node:diagnostics_channel" "node:dgram"
    Elapsed: 78715ms | User: 2047ms | Sys: 385ms
    RSS: 0.38GB | Peak: 0.69GB | Commit: 0.63GB | Faults: 952 | Machine: 38.65GB
    
    panic(main thread): A C++ exception occurred
    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:
    
  5. marked Bun has crashed #11886 as a duplicate of this issue on Feb 3, 2026
  6. mykola-dev commented on Feb 3, 2026

    @mykola-dev

    panic(thread 38780): Segmentation fault at address 0x0 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.3.5/ea11e86cebmzGz+3/9/DA2AA

    win10, win terminal

  7. ouchihao commented on Feb 6, 2026

    @ouchihao

    I also encountered the same problem. Even though I used bun 1.3.8, I still couldn't solve it.

  8. natanim-kemal commented on Feb 6, 2026

    @natanim-kemal

    Same here

    ============================================================
    Bun v1.3.5 (1e86cebd) Windows x64
    Windows v.win11_dt
    CPU: sse42 avx avx2
    Args: "C:\Users\Hp\AppData\Roaming\npm\node_modules\opencode-ai\node_modules\opencode-windows-x64\bin\opencode.exe"
    Elapsed: 3ms | User: 15ms | Sys: 0ms
    RSS: 17.41MB | Peak: 17.41MB | Commit: 55.55MB | Faults: 4412

    panic(main thread): Segmentation fault at address 0x7FF71BFD7B97
    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.3.5/w_11e86cebAAoj7xFuvbgjMopvizDCYKERNEL32.DLLut0LCSntdll.dll4gijBA2u//Bu591/b

  9. zhenbiao-l commented on Feb 9, 2026

    @zhenbiao-l

    I also encountered the same problem. Even though I used bun 1.3.8, I still couldn't solve it.

  10. WangNingkai commented on Feb 11, 2026

    @WangNingkai
    Image I also encountered the same problem.Even though I used bun 1.3.9, I still disappear 1.3.8.
  11. 23 remaining items

  12. christian-taillon commented on Apr 24, 2026

    @christian-taillon

    The bun crashes are bun issues, we are in the works of moving off of bun to node since crashes are too pervasive.

    Without making this decision for you, I think we were hopping for this. Absolutely a bun issue. I thought it might just be a new release OpenCode needed to move to with fixes, but over last few weeks and searching existing issues, it does seem pervasive.

    Thank you for the update.

  13. removed
    bugSomething isn't working
    on May 3, 2026
  14. stefaneidelloth commented on May 5, 2026

    @stefaneidelloth

    If there is already an option to run OpenCode with node instead of bun, please let me know. (bun seems to be part of windows binary and installing with npm did not help).

  15. christian-taillon commented on May 6, 2026

    @christian-taillon

    I tried using the npm install path directly, but unfortunately it did not avoid Bun for me.

    npm install -g opencode-ai still appeared to install/invoke the bundled .opencode standalone executable, and the crash output still showed:

    Bun v1.3.x ... [StandaloneExecutable]
    

    So my read is that npm installs the CLI package, but the actual OpenCode runtime is still the Bun-compiled binary, at least in the current release. This matches other reports where the npm/binary package still includes a Bun standalone executable, and OpenCode’s plugin docs also note that npm plugins are installed using Bun and cached under ~/.cache/opencode/node_modules/.

    So unless there is a hidden flag or newer branch that runs OpenCode fully under Node, I do not think npm is currently a true Node-only workaround.

  16. Mte90 commented on May 6, 2026

    @Mte90

    It is happening a lot with the latest version, on discord we are discussing about it https://discord.com/channels/1391832426048651334/1501486014101717102

    It happens on 1.14.39

    Image
  17. Mte90 commented on May 6, 2026

    @Mte90

    In my case the report is https://bun.report/1.3.13/Ba1bf2e2cem5Gz/339/D4vyi7E+inQwgqvmDA2AI

    There is a way to use nodejs in the meantime?

  18. Mte90 commented on May 6, 2026

    @Mte90

    Similar issue #24148

  19. Mte90 commented on May 6, 2026

    @Mte90

    I believe that oven-sh/bun#29464 is the culprit

  20. Mte90 commented on May 7, 2026

    @Mte90

    I can confirm that downgrading to 1.14.33 works, just remember to disable the autoupdate.

  21. J4n3kk commented on May 8, 2026

    @J4n3kk

    It was crashing on the 1.14.33, seems like bun fix is waiting to be approved -> oven-sh/bun#30349

  22. Electricitysheep commented on May 11, 2026

    @Electricitysheep

    复现报告:v1.14.48 更新后 Bun 再次崩溃(反复出现的老问题)

    环境

    • OpenCode 版本: 1.14.48(最新)
    • 操作系统: Windows 10.0.26200.0
    • 终端: PowerShell 5.1.26100.8115
    • 安装方式: npm install -g opencode-ai

    问题描述

    每次 OpenCode 更新版本后,Bun 几乎必然在第一次启动时崩溃。从 v1.14.39 开始这个问题就反复出现,v1.14.48 再次复现。这不是第一次发生——几乎每次大版本更新都会触发。

    复现步骤

    1. 运行 npm install -g opencode-ai 或等待自动更新到新版本
    2. 运行 opencode
    3. TUI 启动后短时间内 Bun 崩溃,显示 Segmentation fault 或 panic(main thread)
    4. 错误信息:oh no: Bun has crashed. This indicates a bug in Bun, not your code.
    5. 回退到旧版本后通常恢复正常

    关键观察

    1. 升级后首次启动几乎必崩:每次版本更新后第一次启动有很大概率崩溃
    2. 回退版本通常解决:降级到 v1.14.33 或更早版本可恢复正常
    3. Node.js 安装路径无法避免——即使通过 npm 安装,opencode 内部仍使用 Bun 编译的 standalone 二进制文件
    4. 这不是特定于某个插件或配置的问题——裸机安装也会发生

    与其他 Issue 的关系

    这个问题已经被多次报告(#8785, #14724, #14941, #15056, #15283, #24075),但每次版本更新都再次出现,说明Bun 运行时版本的兼容性并不是一次性解决的。

    建议

    既然 @rekram1-node 在 #8785 中已经提到 "we are in the works of moving off of bun to node since crashes are too pervasive",希望这个迁移工作能尽快完成。在此之前:

    • 每次发布前增加对 Windows + Bun 的启动回归测试
    • 考虑为 Windows 用户提供降级到已知稳定 Bun 版本的备用通道

    附:oven-sh/bun#30349 可能是相关的 Bun 修复等待合入。

  23. Stven-ben commented on May 12, 2026

    @Stven-ben

    The same problem has been occurring on my computer for a very long time. When will the official team address this issue and resolve it?
    Suggestion: You can directly enable opencode through node instead of bun.
    In the long term, it is recommended to replace bun.

  24. avonyu commented on Jun 25, 2026

    @avonyu

    It means that we need using npm/pnpm to install opencode instead of bun?

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