Skip to content

Bun panic (Illegal instruction) + severe memory leak after ~12h session — opencode 1.17.14 on Windows 11 #35847

Closed as not planned

Description

@touful

Description

opencode 1.17.14 crashes after long-running sessions (~12 hours) with a Bun runtime panic (Illegal instruction), accompanied by severe memory growth. RSS reached 42.90 GB (peak 45.29 GB) and system memory usage hit 94% (59.8 / 63.4 GB) right before the crash.

The crash output explicitly states: "Bun has crashed. This indicates a bug in Bun, not your code."

Crash details (from terminal)

Bun v1.3.14 (0d9b296a) Windows x64 (baseline)
Windows v.win11.dt · glm-5.2 huoshan3
CPU: sse42 avx avx2

Args: "D:\software\program\nvm\nvmw\nodejs\node_modules\opencode-ai\bin\opencode.exe" "--user-agent=opencode/1.17.14" "--use-system-ca" "--" "--port" "35743"

Elapsed: 44071920ms | User: 14254046ms | Sys: 2566156ms
RSS: 42.90GB | Peak: 45.29GB | Commit: 52.30GB | Faults: 398193872 | Machine: 68.08GB

panic(main thread): Illegal instruction at address 0x7FF6E198A852
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Memory state (Task Manager at crash time)

Metric Value
Memory 59.8 / 63.4 GB (94%)
In use (compressed) 59.8 GB (811 MB)
Available 3.6 GB
Committed 98.8 / 100.0 GB
Cached 3.6 GB
Non-paged pool 1.6 GB
Page faults 398,193,872

Crash report

Bun generated a redacted crash report:

https://bun.report/1.3.14/ea10d9b296mWG+gooCkl0u+CoqkvtDq1+koDg9lz+Ciumz+C+6g+uC6l97uC6o87uC8967uC6ook4B4u/j4BstsJ4Bs13s2Bwzxs2B___A3s//B96r9se

OpenCode version

1.17.14

Steps to reproduce

  1. Launch opencode 1.17.14 on Windows 11 (Bun v1.3.14 baseline).
  2. Keep a session running for an extended period (~12 hours in this case).
  3. Observe memory usage growing continuously (RSS climbed to ~43 GB).
  4. Eventually the process panics with Illegal instruction and crashes.

Screenshot and/or share link

Two screenshots attached below:

  • Screenshot 1: terminal crash output (Bun panic + full diagnostics)
  • Screenshot 2: Task Manager showing 94% memory usage at crash time

Operating System

Windows 11

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jul 8, 2026

    @github-actions
    Contributor

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

    If your issue is already covered by one of the above, please add a comment there with your diagnostics rather than opening a new report. If it is distinct (e.g., the Illegal instruction panic at a specific address is the primary issue rather than just OOM), please clarify what differs so maintainers can triage it separately.

  2. touful commented on Jul 8, 2026

    @touful
    Author

    ⚠️ Security warning — do not download opencode_fix.zip in the comment above

    The user @guvubededome who posted that attachment:

    • Account created on 2026-07-08 (only hours before this issue was opened)
    • Zero repositories, zero followers, zero following, no bio, no public activity
    • Replied 21 seconds after the issue was created

    This is a classic supply-chain phishing pattern: a throwaway account monitoring new issues and dropping a "fix" attachment that is almost certainly malicious malware.

    Do not download, extract, or run opencode_fix.zip. I have reported the account to GitHub for abuse. Legitimate fixes will always come through a PR reviewed by maintainers, never a zip attachment from a brand-new account in an issue comment.

    If you already downloaded/ran it, treat your machine as compromised: disconnect from network, run a full AV scan, rotate credentials that may have been on that machine.

  3. touful commented on Jul 8, 2026

    @touful
    Author

    Cross-referencing related issues for maintainer triage:

    The github-actions bot flagged several related issues. After reviewing them, here's how this one maps:

    Issue Overlap What's different here
    #35107 (root cause: structuredClone + mimalloc not returning pages) Same memory-growth root cause This issue provides an extreme data point: RSS 42.9 GB / 398M page faults over 12.2h — the largest sample reported so far
    #33742 (Bun segfault on Windows, v1.17.10+) Same "long-running → native crash on Windows" pattern This issue crashes with Illegal instruction at 0x7FF6E198A852 (not segfault/SIGSEGV) — a distinct crash signature that may point to a different code path (possibly AVX2 JIT, given the CPU flags avx avx2)
    #24445, #33213, #20695 Same memory-leak class Subset of the broader memory issue

    Suggestion for maintainers:

    A full redacted Bun crash report is available at:
    https://bun.report/1.3.14/ea10d9b296mWG+gooCkl0u+CoqkvtDq1+koDg9lz+Ciumz+C+6g+uC6l97uC6o87uC8967uC6ook4B4u/j4BstsJ4Bs13s2Bwzxs2B___A3s//B96r9se

    Two screenshots (terminal crash output + Task Manager at 94% RAM) will be attached shortly.

  4. 2015chunhui commented on Aug 27, 2026

    @2015chunhui

    我也是, 长时间运行后, 就直接内存 crash 了;有没有临时规避的方法

  5. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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