URGENT - "MEM LEAK", eats up gigabytes of ram until system crash #577

Closed
opened 2026-02-16 17:27:24 -05:00 by yindo · 6 comments
Owner

Originally created by @mchzimm on GitHub (Jul 9, 2025).

Originally assigned to: @thdxr on GitHub.

immediately after starting up (AKA "opencode" in Linux CLI, nothing else, no command issued) the app spawns "gopls" threads, each with increasing mem footprint, eventually crashing the OS, requires spamming CTRL-C ("/exit" won't fully quit the app).

Image
Originally created by @mchzimm on GitHub (Jul 9, 2025). Originally assigned to: @thdxr on GitHub. immediately after starting up (AKA "opencode" in Linux CLI, nothing else, no command issued) the app spawns "gopls" threads, each with increasing mem footprint, eventually crashing the OS, requires spamming CTRL-C ("/exit" won't fully quit the app). <img width="1909" height="996" alt="Image" src="https://github.com/user-attachments/assets/2d7c62c9-0535-4979-a793-171ecf3eaa7b" />
yindo closed this issue 2026-02-16 17:27:24 -05:00
Author
Owner

@mchzimm commented on GitHub (Jul 9, 2025):

i re-installed go because i thought maybe that's the problem, but same issue

go version
go version go1.24.5 linux/amd64

@mchzimm commented on GitHub (Jul 9, 2025): i re-installed go because i thought maybe that's the problem, but same issue > go version go version go1.24.5 linux/amd64
Author
Owner

@mchzimm commented on GitHub (Jul 9, 2025):

so i started w/ v 0.2.6, because i remembered that one worked, then updated version-by-version. the "mem leak" issue starts with opencode v0.2.10, although it stabilizes after a few minutes and using up ~10gb, and cpu is going quite wild also:
Image

this only got worse then going forward from v0.2.11 onward, and i had to spam CTRL-C to stop before it'd lock up the OS:
Image

@mchzimm commented on GitHub (Jul 9, 2025): so i started w/ v 0.2.6, because i remembered that one worked, then updated version-by-version. the "mem leak" issue starts with opencode v0.2.10, although it stabilizes after a few minutes and using up ~10gb, and cpu is going quite wild also: <img width="1909" height="996" alt="Image" src="https://github.com/user-attachments/assets/d46acb24-4cb8-4ce8-ae3c-d0e315da3fcf" /> this only got worse then going forward from v0.2.11 onward, and i had to spam CTRL-C to stop before it'd lock up the OS: <img width="1909" height="996" alt="Image" src="https://github.com/user-attachments/assets/c917277d-4241-428c-8d1a-85edd9fe5b31" />
Author
Owner

@thdxr commented on GitHub (Jul 9, 2025):

do you have a lot of go.mod files in your repo?

@thdxr commented on GitHub (Jul 9, 2025): do you have a lot of `go.mod` files in your repo?
Author
Owner

@mchzimm commented on GitHub (Jul 10, 2025):

do you have a lot of go.mod files in your repo?

i'm not working on any go code, just python

@mchzimm commented on GitHub (Jul 10, 2025): > do you have a lot of `go.mod` files in your repo? i'm not working on any go code, just python
Author
Owner

@mchzimm commented on GitHub (Jul 10, 2025):

i upg to 0.2.18, the mem increase and high cpu util issues seem to be resolved.

still a lot of gopls but at with much less mem allocation and cpu utilization, and not keep spawning those repeatedly:
Image
Image

so far so good!

@mchzimm commented on GitHub (Jul 10, 2025): i upg to 0.2.18, the mem increase and high cpu util issues seem to be resolved. still a lot of `gopls` but at with much less mem allocation and cpu utilization, and not keep spawning those repeatedly: <img width="1909" height="996" alt="Image" src="https://github.com/user-attachments/assets/61bc4a5e-4ca5-4ba1-8090-5f18b0026ec0" /> <img width="1909" height="996" alt="Image" src="https://github.com/user-attachments/assets/43f04603-9ab1-4a4f-8957-183f6db9f6a6" /> so far so good!
Author
Owner

@mchzimm commented on GitHub (Jul 10, 2025):

i'll close this issue for now, as it seems to be resolved

@mchzimm commented on GitHub (Jul 10, 2025): i'll close this issue for now, as it seems to be resolved
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#577