Skip to content

Possible EventTarget memory leak detected #34178

Closed

Description

@grigio

Description

opencode-1  | 
opencode-1  |                                    ▄     
opencode-1  |   █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
opencode-1  |   █  █ █  █ █▀▀▀ █  █ █    █  █ █  █ █▀▀▀
opencode-1  |   ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀
opencode-1  | 
opencode-1  |   Local access:        http://localhost:4444
opencode-1  | 662 |     var file = this.spawnfile = options.file, spawnargs;
opencode-1  | 663 |     if (options.args === @undefined)
opencode-1  | 664 |       spawnargs = this.spawnargs = [];
opencode-1  | 665 |     else
opencode-1  | 666 |       validateArray(options.args, "options.args"), spawnargs = this.spawnargs = options.args;
opencode-1  | 667 |       if (this.#handle = Bun.spawn({
opencode-1  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^
opencode-1  | error: Executable not found in $PATH: "xdg-open"
opencode-1  |       path: "xdg-open",
opencode-1  |      errno: -2,
opencode-1  |    syscall: "spawn xdg-open",
opencode-1  |  spawnargs: [ "http://localhost:4444" ],
opencode-1  |       code: "ENOENT"
opencode-1  | 
opencode-1  |       at spawn (node:child_process:667:35)
opencode-1  |       at spawn (node:child_process:14:39)
opencode-1  |       at <anonymous> (/$bunfs/root/chunk-vvstd9pe.js:2:3353)
opencode-1  | MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 event listeners added to [vY]. MaxListeners is undefined. Use events.setMaxListeners() to increase limit
opencode-1  |  emitter: vY {
opencode-1  |   _events: [Object ...],
opencode-1  |   _eventsCount: 1,
opencode-1  |   _maxListeners: undefined,
opencode-1  |   [Symbol(kCapture)]: false,
opencode-1  |   emit: [Function: emit],
opencode-1  |   setMaxListeners: [Function: setMaxListeners],
opencode-1  |   getMaxListeners: [Function: getMaxListeners],
opencode-1  |   addListener: [Function: addListener],
opencode-1  |   on: [Function: addListener],
opencode-1  |   prependListener: [Function: prependListener],
opencode-1  |   once: [Function: once],
opencode-1  |   prependOnceListener: [Function: prependOnceListener],
opencode-1  |   removeListener: [Function: removeListener],
opencode-1  |   off: [Function: removeListener],
opencode-1  |   removeAllListeners: [Function: removeAllListeners],
opencode-1  |   listeners: [Function: listeners],
opencode-1  |   rawListeners: [Function: rawListeners],
opencode-1  |   listenerCount: [Function: listenerCount],
opencode-1  |   eventNames: [Function: eventNames],
opencode-1  | },
opencode-1  |     type: "event",
opencode-1  |    count: 11,
opencode-1  | 
opencode-1  |       at overflowWarning (node:events:185:19)
opencode-1  |       at addListener (node:events:158:22)
opencode-1  |       at ~effect/Effect/evaluate (/$bunfs/root/chunk-624361m2.js:25:4492)
opencode-1  |       at runLoop (/$bunfs/root/chunk-624361m2.js:25:2045)
opencode-1  |       at evaluate (/$bunfs/root/chunk-624361m2.js:25:1435)
opencode-1  |       at runTasks (/$bunfs/root/chunk-624361m2.js:11:12793)
opencode-1  |       at afterScheduled (/$bunfs/root/chunk-624361m2.js:11:12680)
opencode-1  | 

Plugins

No response

OpenCode version

No response

Steps to reproduce

i can't reproduce it in a consistent way but it is opencode running in docker alpine and after some days it crashes

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jun 27, 2026

    @github-actions
    Contributor

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

    There's also a memory megathread at #20695 that may be relevant.

    Please check if any of these cover your issue. If so, adding a comment there with your Docker Alpine context would be helpful.

  2. grigio commented on Jun 27, 2026

    @grigio
    Author

    probably related to #33234

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