Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serious memory leak issue on windows10 #12561

Closed
1 task done
shenjackyuanjie opened this issue Jun 1, 2024 · 9 comments
Closed
1 task done

serious memory leak issue on windows10 #12561

shenjackyuanjie opened this issue Jun 1, 2024 · 9 comments
Labels
bug [core label] performance Feedback for performance issues, speed, memory usage, etc windows

Comments

@shenjackyuanjie
Copy link
Contributor

shenjackyuanjie commented Jun 1, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

as we all know, ( #8436 #7939
zed have some tiny memory leak(?) issue since sometimes ago
some how, it will only increase the memory usage for about 1mb/min ( on my windows 10 )

but at some times the memory leak issue became FAST

Environment

Zed: v0.139.0 (Zed Dev 29b5253)
OS: Windows 10.0.19045
Memory: 95.9 GiB
Architecture: x86_64

image

image

image

@shenjackyuanjie shenjackyuanjie added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jun 1, 2024
@apricotbucket28
Copy link
Contributor

but after the commit 94c3101, the memory leak issue became FAST

That commit didn't change anything on Windows or macOS. It only affects Linux code.

If you want to help track down the memory leak, use a tool like the Visual Studio memory profiler and post the memory dump here.

@JosephTLyons JosephTLyons added performance Feedback for performance issues, speed, memory usage, etc windows and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jun 5, 2024
@skejeton
Copy link

skejeton commented Jun 5, 2024

After a session of debugging and tracing, it seems like the issue is not in zed itself, but in blade_graphics implementation of the Vulkan backend. reset_descriptor_pool resets all the sub_pools, however, when we allocate a new descriptor via alloate_descriptor_set, it only uses the latest pool, it doesn't actually reuse the previous pools.

@skejeton
Copy link

skejeton commented Jun 8, 2024

I confirm the issue is in blade_graphics, and specifically, Intel HD graphics driver, not zed. kvark/blade#117

@shenjackyuanjie
Copy link
Contributor Author

I confirm the issue is in blade_graphics, and specifically, Intel HD graphics driver, not zed. kvark/blade#117

hmmmm, so there's the problem, my gpu are AMD RX580, so it's possible not just an intel only issue, or it's anther issue

@shenjackyuanjie shenjackyuanjie changed the title serious memory leak issue on windows10 after commit serious memory leak issue on windows10 Jun 9, 2024
@xgfone
Copy link

xgfone commented Jun 12, 2024

FYI
screenshot-20240612-104247

@heksesang
Copy link

So the issue with Intel HD Graphics is solved in kvark/blade@845cdad, but the zed master branch is still on an older commit it seems.

@aramrw
Copy link

aramrw commented Jul 6, 2024

I am having the same problem.

Zed.log seems to be looping over a git error infinitely for as long as the program is running:

2024-07-06T12:05:50-07:00 [ERROR] Error 
{ code: -9, klass: 4, message: "reference 'refs/heads/master' not found" } x500

This is a git error, however the constant error loop is causing a memory leak if I open a project with no git open, zed doesn't leak memory.

Environment

Zed: v0.144.0
OS: Windows 11 Home 10.0.22631 Build 22631
Memory: 32 Gib
Architecture: x64-based PC
Gpu: Nvidia Rtx 4090
Cpu: Amd 7800x3d

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter
Copy link
Member

notpeter commented Nov 5, 2024

  1. Is this still an issue?
  2. I recall this could occur when git init had been run in a project directory, but there were not yet any git commits. Does this match your situation?

@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
@shenjackyuanjie
Copy link
Contributor Author

is not an issue anymore, but I'm not sure if we'll meet it again
git looks like anther issue, and I'm not sure about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] performance Feedback for performance issues, speed, memory usage, etc windows
Projects
None yet
Development

No branches or pull requests

8 participants