Skip to content

Server v1.15.10 crashes repeatedly due to massive memory leak and file watcher binding failure #29177

Closed as not planned

Description

@luchesar

Environment

  • Version: 1.15.10
  • Binary: Bun-compiled ELF binary at ~/.opencode/bin/opencode
  • OS: Linux, x86-64, 14 GB RAM
  • Start command: opencode serve --hostname <ip> --port 4096

Symptoms

The server crashes repeatedly (11+ restarts since May 22, 32 ERROR lines in one session). Two primary issues:

1. Massive memory leak

The process virtual memory grows unbounded:

VmPeak: 135413388 kB
VmSize: 74711184 kB  (and growing ~65 MB/minute)
VmData: 65349732 kB
VmRSS:     393488 kB

RSS is only ~400 MB, but virtual address space balloons to 71+ GB and keeps growing until the process is killed. This happens irrespective of workload.

2. File watcher native binding fails to load

Every session starts with this error — the binary references a Bun runtime artifact path that does not exist:

ERROR service=file.watcher error=/$bunfs/root/watcher-0pmc4yjg.node: cannot open shared object file: No such file or directory failed to load watcher binding

3. Share service unreachable

ERROR service=share-next ... share flush failed
cause: ConnectionRefused to https://opncd.ai/api/share/...

This repeats many times per session (likely a retry storm contributing to memory pressure).

4. Session processing aborted on shutdown

ERROR service=session.processor session.id=ses_1a77f9872ffeBYegxBfc4c9pdW messageID=msg_e5c018199001GscPkBEJy1GS3d error=Aborted process
ERROR service=session.processor session.id=ses_1a9651492ffe83maUzVPdKSjia messageID=msg_e5899363b001use0oxgd3tVbPU error=Aborted process

Logs

~/.local/share/opencode/log/

Expected behavior

  • Server should not allocate 65 GB of virtual memory for normal operation
  • File watcher should gracefully degrade if the native binding cannot load
  • Share sync failures should not produce cascading errors

Please investigate the memory leak (likely in the Bun runtime or file watcher binding) and the missing native module path at /$bunfs/root/watcher-0pmc4yjg.node.

Activity

  1. github-actions commented on May 25, 2026

    @github-actions
    Contributor

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

  2. juleslemee commented on May 26, 2026

    @juleslemee

    had the same issue - VmSize ~509 GB after 3 days running, RSS 1 GB

  3. github-actions commented on Jul 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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