brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.24k stars 2.23k forks source link

zombie process high CPU usage & memory leaks #39606

Open youngunix opened 3 weeks ago

youngunix commented 3 weeks ago

Description

*Issue: 1

After closing brave and logging out, I kept hearing the laptop fans jetting as if I was compiling a kernel from source. I logged back in, started a terminal and launched htop to see that 2 Cores running constantly at 100%. The culprit was /opt/brave/brave and some other parameters that I couldn't catch because it kept disappearing and reappearing every second. I decided to reboot and it froze at the RC screen (used the power button to force shutdown).

*Issue: 2

it seems that there is a memory leak, which might explain why /opt/brave/brave occupied 32GB of virtual memory. I managed to capture the output of valgrind -s -v --leak-check=full --show-leak-kinds=all --log-file=brave_mem_leak.txt brave-bin which is a very large file.

brave_mem_leak.txt

Steps to reproduce

  1. open brave and use it
  2. after awhile, quit brave and log out
  3. log back in and monitor htop

Actual result

hight CPU usage (zombie process) and memory leak.

Expected result

the brave process to {die} after quitting the application. No memory leak.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

Brave | 1.67.123 Chromium: 126.0.6478.126 (Official Build) unknown (64-bit) Revision | fc7619ef621fe4e6a0fa8b16c718f78ffc97a861 OS | Linux

Channel information

Reproducibility

Miscellaneous information

No response

rebron commented 2 weeks ago

cc: @atuchin-m