oasislinux / oasis

a small statically-linked linux system
Other
2.75k stars 84 forks source link

Memory Leaking Issue. #56

Closed LaithOsama closed 4 months ago

LaithOsama commented 1 year ago

Last night, I installed Oasis on my laptop, and the installation process went smoothly. However, I encountered similar issues to those I experienced in the QEMU version. Specifically, when I open programs like mpv, the RAM usage steadily increases every second. This consumption continues to escalate until it reaches its maximum, leading to a video crash. Additionally, the overall RAM usage in Oasis appears to be higher than anticipated (60MB in Oasis, 35MB in KISS/sway, 40MB in Void/dwm). I believe that the RAM usage in Oasis should be lower.

In an attempt to gather more information, I exported WAYLAND_DEBUG=1, hoping to obtain some useful output. However, the output was rather chaotic. Please let me know if you require any specific output or further details.

Thank you for your attention to this matter.

Issues in short:

  1. Observe steady increase in RAM usage.
  2. MPV memory leaking, Video crashes once RAM usage reaches maximum.

Expected Behavior:

michaelforney commented 1 year ago

For the first issue, I know that mpv had introduced a bug for wayland output that would constantly leak memory when a video was offscreen until it crashes. I didn't get around to debugging it, but it seems to have been fixed in 0.35.1, which I've updated to recently. If you update mpv, does the issue persist.

As for the second, I'm not sure. 20-25M sounds pretty negligable to me. My first guess is that it is due to software rendering (creating frame buffers in memory) rather than hardware rendering (creating frame buffers in GPU memory). Can you identify which process(es) are using more memory than you expect?

LaithOsama commented 1 year ago

Please accept my apologies for the delayed response. Firstly, I would like to express my gratitude for this impeccable system. Over the past few months, I have been utilizing this system, and it has allowed me to regain control over how I use my computer. It has transformed my computer into a productive tool, rather than a mere time-waster (riching, tinker with unnecessary software .. etc). I commend the exceptional precision and care with which it has been designed.

I am pleased to inform you that the issue with mpv has been resolved, which is a relief as it is an integral part of my workflow.

However, I would like to address the concern regarding the relatively high memory usage. Although losing 20MB may seem insignificant, the unexpected behavior prompts me to raise this matter. Initially, I suspected a memory leak or some underlying problem causing this discrepancy.

Upon further investigation, it appears that the readings from the free -m command may be misleading. When I used htop, the memory usage was shown to be around 30MB. This discrepancy raises questions about whether the cache usage of memory, as indicated by free -m, is accurate or if it is merely providing false readings.

I would appreciate any insights or clarification regarding this memory usage discrepancy.

Thank you for your attention to this matter.

Also, I had to edit the first comment, I was in a hurry and it was't worded as required.