Skip to content

opencode 1.18.25 (linux x64, Bun standalone): SIGILL (ud2 assertion) during initial TUI render via OpenTUI — parent and child processes die identically #47037

Closed as not planned

Description

@Dandroid-D

Title: opencode 1.18.25 (linux x64, Bun standalone): SIGILL (ud2 assertion) during initial TUI render via OpenTUI — parent and child processes die identically

Environment

  • opencode 1.18.25 installed via mise (~/.local/share/mise/installs/opencode/1.18.25/opencode), Bun standalone executable
  • Arch Linux, kernel 7.1.9, glibc 2.44, AMD Ryzen 9 9900X, Hyprland/Wayland, launched from a terminal (xdg-terminal-exec scope)
  • Model provider session (GLM via zai-coding-plan) — likely irrelevant to the render path

What happened

Launched opencode --auto --prompt "<long multi-line text>" (content elided — plain prose with newlines, nothing exotic). Approximately 8 seconds after launch, during initial TUI rendering, both opencode processes (parent PID 1761403 + child PID 1761503) crashed in the same second with identical stacks. No session had been created yet. systemd-coredump retained both cores.

Signal: 4 (ILL) si_code: ILL_ILLOPN

Forensics

Faulting instruction is a deliberate ud2 trap (preceded by call + int3 padding), at binary offset opencode + 0x2407064 — i.e., an assertion/panic in the Bun/Zig layer, not an unsupported CPU instruction and not memory corruption.

Both processes' stacks are byte-identical. Key frames (systemd unwinder):

#0-#3   opencode + 0x2407064 / 0x2405266 / 0x32dd8bf / 0x44e35ad   (trap + callers, Bun layer)
#4      libc.so.6 + 0x3e6f0
#5      /tmp/.<random-hash>-00000000.so + 0x1d061d

The /tmp/.<hash>-00000000.so module is OpenTUI core (extracted at startup, unstripped, full debug_info). Frame #5 symbolizes to:

buffer.OptimizedBuffer.trySetTransparentTextCellFast
opentui/packages/core/src/zig/buffer.zig:896 (discriminator 6)

So the crash thread was rendering text cells into the TUI buffer during startup when the Bun layer hit an internal assertion.

Recurrence

First occurrence after ~50 sessions across 5 days on 1.18.25 (installed 2026-09-01; zero prior opencode coredumps on this machine). Immediate relaunch with the same command succeeded and ran normally. One-off so far, but both processes dying simultaneously at the same assertion suggests a startup-render race rather than content-dependent input.

Questions / offers

  • Is +0x2407064 (1.18.25 linux x64 build) a known Bun-side assertion site reachable from the OpenTUI render path? If you can symbolize internally, the full coredumpctl stacks of both PIDs are available on request (they are 99 MB each — not attached).
  • Any known startup-render race between parent and child both initializing the TUI buffer (transparent-cell fast path)?
  • Happy to re-run with any diagnostic build or env var you suggest.

Activity

  1. github-actions commented on Sep 3, 2026

    @github-actions
    Contributor

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

    Given that #42094 and #41483 share the exact same binary offsets and symbolized OpenTUI frame, they are very likely the same root cause. You may want to add your core dump details as a comment there rather than tracking separately.

  2. Dandroid-D commented on Sep 6, 2026

    @Dandroid-D
    Author

    Quick correction on the original report: I noted that full coredump stacks were available on request. To clarify, I can share fully symbolized stack text on request, but I will not share raw core files because they contain process memory and environment data.

    Update on recurrence: this crash reproduced on 2026-09-06 at 16:27 (+07), confirming it is not a one-off.

    Summary of the second crash:

    • Version and build: opencode 1.18.25 (build ID c30f169b1bef81fa57467cd091ba53aab5235468), identical to the original report
    • Invocation: opencode --auto --prompt startup
    • Trap: SIGILL (ud2) at opencode+0x2407064 (exact same offset)
    • Frame tweak: glob should be able to read certain hidden files/dirs #5: buffer.OptimizedBuffer.trySetTransparentTextCellFast at opentui/packages/core/src/zig/buffer.zig:896 (symbolized via addr2line on the extracted /tmp/.<hash>-00000000.so module)
    • Process count: single process (PID 2769243), unlike the 2026-09-03 crash where parent and child died simultaneously

    The failure signature is identical across independent runs on 1.18.25: a deterministic Zig panic trap (ud2) hit in OpenTUI's buffer.zig:896 during initial text rendering.

  3. 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