Open Bug 1903396 Opened 1 year ago Updated 1 year ago

WebExtension / port.postMessage Memory Leak

Categories

(GeckoView :: Extensions, defect, P3)

Firefox 126
All
Android
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: matthew, Unassigned)

Details

Steps to reproduce:

I created a test app which loads up GeckoView, and installs a simple content script extension which passes stringified JSON data back and forth from Kotlin to a webpage whose files exist locally on the Android device. After some time, memory usage will gradually increase and the app will crash. I have tried using a background script as well but that does not fix the issue.

I call port.postMessage() with the stringified JSON data every 5-10 seconds. As a result, memory will gradually climb over time, and seems to crash at around the 8-12 hour mark.

Actual results:

Memory will rise and garbage collector will run but not free up all memory, and Geckoview will consume so much memory that the application crashes.

Expected results:

GeckoView should not leak memory and not crash.

The severity field is not set for this bug.
:amejia, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(amejiamarmol)
Flags: needinfo?(amejiamarmol)

The severity field is not set for this bug.
:amejia, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(amejiamarmol)
Severity: -- → S4
Flags: needinfo?(amejiamarmol)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.