-
Notifications
You must be signed in to change notification settings - Fork 953
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
Memory leak #3561
Comments
It also seems to use memory even faster when it's not currently visible, this might be some weirdness with the sway handles programs that aren't visible? |
Did you have a chance to try to reproduce it on x11 on the same system? |
I've tried it on another X system without the same result, however I'll try setting it up on my system tonight and let you know. |
Alright, it seems to not be Wayland, just tried it on someone else's computer who has Wayland and it has no problem, so I'm not sure what else it could be. Maybe it's related to my AMD integrated GPU? This issue comes to mind, as it is a problem I also have but haven't tried working out. |
On The best way I've found to replicate this is to resize the window continuously so that more memory is allocated. Running ASAN reported this, but it can't seem to figure out where the allocations are coming from: https://gist.github.com/i509VCB/e5d8cb5cf4d84bb8f4f1b93dd975fd55 The Xlib and xcb leaks are probably fine to ignore, although I'd be interested in seeing if those can be cleaned up to I suspect this may be a memory leak in wgpu. |
It makes sense to be connected to the resizing continuously if it's related to the other bug because it would be recreating the surface constantly when it's timed out right? |
Using |
Running with |
I've got the same problem on Windows 10 using vulkan backend with RX 6800. And whats interesting, leaking temporary stops after I resize window and then starts again after like 20-30 secs. DX12 backend works fine but for some reason it uses ~x2 time more memory. |
I'm seeing very similar symptoms on NixOS on Wayland. GPU is a Radeon RX 6600 XT, with CPU being a AMD Ryzen 9 7900X (with integrated graphics). EDIT: Unlike @xXLINK1123Xx, the leak is not affected by resizing the window |
I think this is the same issue as #5394 (which has been fixed). If you are still seeing leaks like this on the latest release (v22) please reopen the issue or create a new one. |
Description
Program uses more and more memory as it runs, probably a memory leak. Anywhere from a few times a second
to once every few seconds another allocation is made. Upon trying to find problems through
strace
andlldb
it seems tobe related to
TextureTracker
s. I have attempted this on a Windows machine and it doesn't happen, so Ibelieve this may be a Wayland specific bug.
Repro steps
Running any WGPU examples causes this to happen.
Expected vs observed behavior
The memory usage should be stable since there is nothing being loaded, and this behavior is observed on Windows,
but missing on Wayland.
Extra materials
Stack trace of the
brk
system call that was repeatedly allocating memory:Platform
I'm on Arch Linux on Wayland and WGPU version 0.15. I'm on the sway window manager.
The text was updated successfully, but these errors were encountered: