GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Bug] Segfault in onnxruntime_binding.node under OpenCode 2.3.2 (Windows x64, Bun 1.4.4) — reproducible, isolated to opencode-mem 2.43.0 · Issue #518 · tickernelz/opencode-mem

[Bug] Segfault in onnxruntime_binding.node under OpenCode 2.3.2 (Windows x64, Bun 1.4.4) — reproducible, isolated to opencode-mem 2.43.0 #518

New issue
Copy link
New issue
Copy link
Done
#521
Done
[Bug] Segfault in onnxruntime_binding.node under OpenCode 2.3.2 (Windows x64, Bun 1.4.4) — reproducible, isolated to opencode-mem 2.43.0#518
#521
Copy link

Description

@jgzx33
jgzx33
opened on Nov 23, 2026
Issue body actions

Environment

  • OS: Windows 10 22H2 (10.0.19045), x64
  • OpenCode: @opencode/cli 2.3.2 (standalone compiled binary, Bun 1.4.4)
  • opencode-mem: 2.43.0 (installed in an isolated prefix)
  • onnxruntime-node: 1.31.1 (pinned by the plugin)
  • Other plugins loaded: 2 pure-JS plugins (no onnx/libsql users)
  • Embedding: default local (Xenova/nomic-embed-text-v1), storagePath on a clean isolated dir; .turso-migrated present and all 7 shard sidecars report status: complete

Summary

With opencode-mem 2.43.0 loaded, the opencode serve process (2.3.2) dies with a hard segfault in onnxruntime_binding.node. Two crashes observed: after ~98.7s and ~377.3s of uptime. Removing only opencode-mem from the plugin list makes the same workload stable (10+ minutes, no crash) — so the crash is isolated to this plugin's native dependency path.

Reproduction (isolated environment)

  1. Create an isolated XDG/HOME sandbox (XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_STATE_HOME, XDG_CACHE_HOME, USERPROFILE all point to a temp dir).
  2. plugins = ["@dietrichgebert/[email protected]", "<opencode-mem-install-path>", "<local JS plugin>"] (the other two are pure JS).
  3. opencode serve --hostname 127.0.0.1 --port 28899.
  4. Send any authenticated API request after the service is up, e.g. GET /api/agent (HTTP Basic auth).
  5. The server segfaults (see output below). One run also crashed shortly after startup without external API calls.

Crash output (excerpt)

Bun v1.4.4 (38afee6c8) Windows x64
Windows v10.19045
...
Elapsed: 98745ms | User: 2515ms | Sys: 484ms
RSS: 0.35 GB | Peak: 0.38 GB | Commit: 0.65 GB | Faults: 133073

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

https://bun.report/1.4.4/wa138afee6mhmggIugooCCYMSVCP140.dllgo4ECwBonnxruntime_binding.node
...onnxruntime_binding.node... (repeated 5x in the crash report)

Isolation result

Config Workload Result
with opencode-mem 2.43.0 serve + GET /api/agent segfault 2/2
without opencode-mem identical workload stable (10+ min, no crash)

Non-mem plugins were unchanged between runs. Memory operations themselves work correctly when the crash is not hit: writes produced MEMORY.md + entry files and cross-session recall returned the correct value.

Additional context

  • Similar past issues that were fixed: Compiled OpenCode binaries: cannot resolve onnxruntime-node (import.meta points to $bunfs, not the real disk) #298 (compiled-binary $bunfs resolution of onnxruntime-node), [Bug] Bun NAPI crash on TUI exit: process.exit() in SIGINT handler conflicts with onnxruntime-node native cleanup #114 (Bun/onnxruntime native cleanup conflict), [Bug] macOS Intel: OpenCode exits with SIGILL in onnxruntime::Environment destructor after local embedding #225 (onnxruntime destructor crash on Intel macOS).
  • This report comes from a fresh isolated environment (no prior installs, all migrations complete), so it may be a different trigger path than those.
  • Happy to provide full crash logs (two files, ~1.6 KB each) or run any diagnostic build you suggest.

Activity

  1. EyJunge1
    added a commit that references this issue on Nov 24, 2026

    fix(embedding): harden Windows ONNX subprocess isolation

    14d6fc6
  2. EyJunge1 commented on Nov 24, 2026

    @EyJunge1
    EyJunge1
    on Nov 24, 2026
    Collaborator
    More actions

    Fix PR: #521 — local ONNX on Windows runs in a Node/Bun subprocess; host SIGKILLs the worker on dispose and recovers after a worker crash. Workaround until merge: remote embeddingApiUrl + embeddingApiKey.

  3. EyJunge1
    added a commit that references this issue on Nov 24, 2026

    fix(embedding): run Windows ONNX worker via OpenCode BUN_BE_BUN

    66acdc0
  4. EyJunge1 commented on Nov 24, 2026

    @EyJunge1
    EyJunge1
    on Nov 24, 2026
    Collaborator
    More actions

    Update on #521: local embeddings on Windows no longer require a separate Node/Bun install. If neither is on PATH, the plugin re-execs the OpenCode binary with `BUN_BE_BUN=1` so the worker runs in an isolated child using the host's embedded Bun runtime.

  5. EyJunge1
    added a commit that references this issue on Nov 24, 2026

    fix(embedding): isolate Windows local ONNX in a Node subprocess (#521)

    a755b1d
  6. EyJunge1
    closed this as completedin #521on Nov 24, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.