Skip to content

SIGABRT crash on Linux with librust_pty.so loaded — two crashes in 22 minutes under memory pressure #55459

Closed as not planned

Description

@GaganDeep-007

Summary

opencode 1.19.0 crashes with SIGABRT (signal 6, SI_TKILL) on Linux. Two crashes occurred ~22 minutes apart. The first ran ~24 minutes during an active coding session; the second died almost immediately after startup. Both times librust_pty.so (bun-pty) was loaded in the address space. The crash also coincided with system-wide memory pressure (swap thrashing) from multiple concurrent opencode instances each spawning their own MCP server processes.

Environment

  • opencode version: v1.19.0 (installed via mise, Bun-compiled single binary)
  • OS: Arch Linux (Omarchy), kernel latest
  • Terminal: Hyprland + xdg-terminal-exec (TUI mode)
  • Install: /home/gd/.local/share/mise/installs/opencode/1.19.0/opencode
  • Command line: opencode --auto
  • MCP servers configured: playwright-mcp, firecrawl-mcp, postgres-mcp, billion-context (each spawned per opencode instance as child node processes)

Crash details

Crash 1 (PID 5103, 20:27:21 IST)

Signal: 6 (ABRT) si_code: SI_TKILL
Command Line: /home/gd/.local/share/mise/installs/opencode/latest/opencode --auto

Stack (unsymbolized — stripped Bun binary):

#0  abort (libc.so.6 + 0x256ea)
#1  opencode + 0x37ca5d0
#2  opencode + 0x44a5425
#3  opencode + 0x4dfadda
#4  opencode + 0x4f820fc
#5  opencode + 0x47894c6
#6  opencode + 0x4efcbb4
#7-#9  (unmapped JIT frames)
#10 opencode + 0x23a5ec4
#11 opencode + 0x4e85a99

Modules without build-id: /tmp/.bcdfeffff5f5f37c-00000001.so, /tmp/.9adf6bfbe3f1ffa7-00000000.so, librust_pty.so

Crash 2 (PID 46140, 20:49:04 IST)

Same signal, different lower frames (higher in the call stack — likely a different code path to the same abort):

#0  abort (libc.so.6 + 0x256ea)
#1  opencode + 0x37ca5d0
#2  opencode + 0x44a5425
#3  opencode + 0x4dfadda
#4  opencode + 0x4f820fc
#5  opencode + 0x47894c6
#6  opencode + 0x4839641
#7  opencode + 0x483693f
#8-#11  (unmapped JIT frames)
#12 opencode + 0x23a5ec4
#13 opencode + 0x52b6182
#14 opencode + 0x52b46c8
#15 opencode + 0x551aacf
#16 opencode + 0x3c5eebd

Common frames across both crashes: opencode + 0x37ca5d0, + 0x44a5425, + 0x4dfadda, + 0x4f820fc, + 0x47894c6, + 0x23a5ec4, + 0x4e85a99.

System context at time of crashes

  • 11GB RAM total, ~8GB swap used during the crash window (swap 8.2GB/23GB)
  • Multiple concurrent opencode instances running (at least 3 identified in logs)
  • Each instance spawns its own MCP server child processes (playwright, firecrawl, postgres, billion-context) — approximately 5-6 node processes per instance at ~90-115MB RSS each
  • No OOM kill was issued; the system froze under memory pressure (swap thrashing) before OOM could act
  • After the crashes, swap dropped to 0B and memory recovered to 7GB free

Possible contributing factors

  1. bun-pty / librust_pty.so: loaded in both crash address spaces. v1.19.0 release notes mention "Validate PTY connection origins and tickets before checking whether a PTY exists" — a recent PTY change.
  2. Memory pressure from MCP process fan-out: Each opencode instance spawns independent MCP server processes. With 3+ concurrent instances, this creates 15+ node processes totaling several GB, driving the system into swap thrashing.
  3. JIT-compiled code: Anonymous .so modules in /tmp/ (Bun JIT) without build-ids — frames in this region could not be symbolized.

Reproduction

Not reliably reproducible — occurred twice in 22 minutes under memory pressure with multiple concurrent instances. No specific user action immediately preceded either crash.

Request

  1. Symbolize the frames above if possible (the binary is stripped; debug symbols unavailable via debuginfod).
  2. Investigate whether the PTY validation change in v1.19.0 could abort under memory pressure or concurrent PTY access.
  3. Consider bounding MCP server process fan-out when multiple opencode instances run concurrently on the same machine (shared MCP server pool or connection reuse).

Activity

  1. opencode-agent commented on Oct 14, 2026

    @opencode-agent
    Contributor

    Thanks for the detailed report.

    Version 1.19.0 is OpenCode v1, which only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). These crashes happened while the system was swapping heavily with several instances running, each starting its own MCP servers. Running fewer instances at once should avoid them, so this is unlikely to be fixed in v1.

    We'd encourage you to try v2 (@opencode/cli). Its clients talk to a shared server process instead of each starting a full instance of its own, which should cut down the per-instance fan-out you described. Some related issues, most relevant first:

    If you think this is critical, or you can reproduce the crash on v2, please reply here with the v2 version and what you did.

  2. opencode-agent commented on Oct 15, 2026

    @opencode-agent
    Contributor

    We haven't heard back, so I'm closing this as not planned. These SIGABRT crashes were on v1 (1.19.0), which only gets fixes for critical bugs. This one happened while the system was swapping heavily with several instances running, and running fewer instances at once should avoid it.

    If you see the crash on v2 (@opencode/cli), please open a new issue with the v2 version and what you did. If you think this one is critical, reply here and we'll take another look. Thanks for the detailed report.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions