-
-
Notifications
You must be signed in to change notification settings - Fork 595
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 with xrender and experimental backends #892
Comments
Hmm, I can't reproduce this at all. I would need some help from you. A good start would be building with |
Okay I built with
Memory starts growing quickly as soon as I start running but there are no messages in the console output. However, if I run with debug logging, the log does show a constant error message like so:
These errors don't appear when I run with |
Full log: |
I see, there could be a memory leak in the error handling path. I am curious what's causing so many PIXMAP errors though 🤔 |
I don't know. Is there something else I could provide to help understand the issue? |
what applications were running when the leak happens? |
I can get it to happen with just Alacritty running. |
Do you have any background applications, auto-starts, etc.? |
I just killed every user process I could get away with and tried it and same effect. |
So I just tried my picom config with i3 and didn't get any PIXMAP errors or memory growth. I also tried to kill any processes running under LeftWM that weren't running on i3 and the problems still occur under LeftWM. I think the problem may lie there. |
Likely an issue with LeftWM then, I will find some time to try and reproduce this. Thank you for investigating. |
Thank you. I looked around in the issues page in LeftWM but I don't see anyone else having this issue. I'll report back here if I find anything. Thank you for you help and responsiveness. |
I am also finding a memory leak with picom, it's not as fast as @mike-lloyd03 is reporting, but rather slowly eats up my RAM until I kill the process. I only started noticing it after I upgraded my RAM to 24GB from 8GB, but that could just be coincidental. Running picom with
I am running on linux 5.19.13.arch1-1 using picom version vgit-71072, i3 (via the AUR package i3-gaps-rounded-git, version 4.20.1.r107.g3e63a999-1), nvidia GTX 1070ti, driver version 515.76-4. |
@Algorhythm-sxv what WM/DE are you running? |
Ah shoot I meant to include it, I am running i3 (via the AUR package i3-gaps-rounded-git, version 4.20.1.r107.g3e63a999-1), I've added it to the initial comment |
Greetings, I believe I also encountered the same here, though I noticed it via my full swap memory usage and slowed down my spinning drive performance and everything else. This is my second attempt at WMs with Sway being my first. Still getting to know more of how picom works with the provided config from EndeavourOS's BSPWM repo and the default picom config. Will switch to Pastebin w/ Imgur Link at the end: https://pastebin.com/RpJ9RqvL Addendum: I forgot to explicitly mention that the memory build-up was not instant. In the third screenshot, it took ~5h42m to fill. Also long with my prev unobserved leaks. My usage involved Chrome, xset dmps set off, mpv, and couple of kitty instances. Chrome and kitty has glitched rounded corners with xrender, but not sure if it is relevant (glx backend fixes this). |
can someone run picom with if it's an opengl resource leak, i should be able to see it in the trace. |
Also remember to enable |
Memory leaks accumulate slowly, but there you go. https://www.mediafire.com/file/srtwm3rcfh3mgp5/picom.trace.7z/file
|
hey there @yshui once the vram was fully used up, the ram usage would increase by roughly 3% per second |
@Monsterovich did you remember to add |
@yshui I did apitrace again, now with this flag. https://www.mediafire.com/file/cfyd1byyvyyy16d/trace.7z/file The compositor takes about an hour to eat up 600mb of memory, on a computer without this problem the compositor consumes 80mb. |
Thank you |
this is fixed upstream, so never mind. |
destroy_win_finish doesn't call win_release_images to free the images, so we need to add a release_mask call there. Related: #892 Signed-off-by: Yuxuan Shui <[email protected]>
will do, most likely tomorrow |
I am able to 100% reproduce this now.
Steps to reproduce:
Attachements: |
cc @yshui |
hmm, odd, after running incase it helps, here are the packages upgraded:
good that it doesnt happen anymore but i imagine it is frustrating for you as it will make debugging harder... :/ |
@Minetest-j45 i guess it's fixed then 😆 please keep an eye on it if you can, in case it happens again. |
@yshui I was able to catch !w->mask_image assertion. Could you please check what happened? |
How to reproduce this:
|
@yshui Can you just delete this assert if it's not so important? |
If an assertion fails it means something definitely goes wrong. I don't think it's a good idea |
hey there, i was editting my config file and i think i found setting causes the memory leak - atleast for me setting
killing picom, and restarting it, then waiting for abit, the memory leak happens again |
This assertion was added recently for debugging, @yshui please remove it because compositor may randomly crash. In my case when I browse certain websites. |
@Minetest-j45 Please enable the address sanitizer and rebuild picom, otherwise it is not clear which part of the code has the leak. |
Just remove that assert and compile one yourself, it's not that hard ;) |
I did, just a reminder to do it in the master branch. |
calling wrong free function did nothing and produced ton of x errors fixes at least yshui#892
@mike-lloyd03, the original issue should be fixed starting from 99e1a74. if it doesn’t happen to you anymore consider closing at least leftwm issue, since it was picom’s issue. and i don’t know should you close this issue or not because it’s a kind of home for memory leak issues now. |
destroy_win_finish doesn't call win_release_images to free the images, so we need to add a release_mask call there. Related: yshui#892 Signed-off-by: Yuxuan Shui <[email protected]>
calling wrong free function did nothing and produced ton of x errors fixes at least yshui#892
destroy_win_finish doesn't call win_release_images to free the images, so we need to add a release_mask call there. Related: yshui#892 Signed-off-by: Yuxuan Shui <[email protected]>
calling wrong free function did nothing and produced ton of x errors fixes at least yshui#892
I'm getting the memory leak using qtile on NixOS. Using picom v10. My
|
@jlcarruda, try picom built from the latest commit in the next branch. |
currently there are no known leaks in picom. if you think you found a leak in picom, please create a new issue. closing as stale. |
Platform
Linux 5.19.4-arch1-1
GPU, drivers, and screen setup
GPU: Nvidia GTX2070 Super Mobile Max-Q
Driver: 515.65.01
Monitor: Internal monitor, 1920x1080 @ 240 FPS
Environment
WM: Left-WM
picom version
Diagnostics
Version: vgit-f2970
Extensions:
Misc:
Drivers (inaccurate):
NVIDIA, modesetting
Backend: glx
Configuration:
Configuration file
Steps of reproduction
Expected behavior
No memory leak
Current Behavior
All 64 gigs of memory get used up within about a minute or so. I have to enable legacy backends to prevent the memory leak.
The text was updated successfully, but these errors were encountered: