Keepassxc-browser: Browser extension: RAM leak (+1GB) and CPU hogging (100%)

Created on 8 Mar 2018  路  3Comments  路  Source: keepassxreboot/keepassxc-browser

When launching the browser, KeePassXC-Browser extension consumes 22MB of RAM and almost no CPU.
After a few hours running, the RAM consumption goes up to more than 1GB (and it would have kept raising if I didn't killed the extension) and the CPU usage is 100%.

See picture:
image

Expected Behavior

The extension should not leak memory nor hog 100% of CPU.

General Info

KeePassXC Version: 2.3.1
KeePassXC-Browser Version: 1.0.1

Operating system: elementary OS 0.4.1 "Loki" (Linux)
Browser: Chromium Version 64.0.3282.167 (Official Build) Built on Ubuntu , running on elementary 0.4.1 (64-bit)
Proxy used: No

Chrome bug

Most helpful comment

I found the function where this happens. Fixing ASAP.

All 3 comments

I found the function where this happens. Fixing ASAP.

Found another bug related to this. I couldn't get the exact point where this memory leak happens but it's clear that it's a tab object.

The exact point this happens is https://github.com/keepassxreboot/keepassxc-browser/blob/develop/keepassxc-browser/keepassxc-browser.js#L1172. If everything else is commented out but the sendMessage is left, the objects still leak. It's probably related to event.js's kpxcEvent.invoke. I'll do more testing when I have the time.

Btw, I noticed that with Chrome/Chromium setting the icon leaks some stuff. This is a bug inside their browser implementation. Haven't found a better way to change the icon dynamically.

Was this page helpful?
0 / 5 - 0 ratings