Closed Bug 1388750 Opened 7 years ago Closed 3 years ago

Web apps - Apps suddenly stopped responding, running out of memory

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P5)

57 Branch
ARM
Android
defect

Tracking

(firefox57 affected, firefox58 affected)

RESOLVED INCOMPLETE
Firefox 58
Tracking Status
firefox57 --- affected
firefox58 --- affected

People

(Reporter: ohorvath, Assigned: droeh)

References

Details

Attachments

(3 files, 1 obsolete file)

Attached file log.txt
Device: Motorola Nexus 6 (Android 7.0)
Build: Nightly 57.0a1 (2017-08-08);

Steps to reproduce:
1. Make sure the "Progressive web apps" toggle is ON, in Settings>Advanced menu.
2. Install a few web apps and open all of them.
3. While browsing and switching between the web apps, notice if they stop responding or show a blank page.

Expected result:
Multiple web apps should run at the same time.

Actual result:
While browsing and switching between the web apps (2 to 4 apps), they stop responding or show a blank page. I noticed a running out of memory error in the logcat. See attached.
Assignee: nobody → droeh
Priority: -- → P1
Attached patch Add setActive() to GeckoView (obsolete) — Splinter Review
So I wasn't able to actually reproduce this, even with 15 PWAs running. But assuming it's memory related, I'm hoping this patch (which sets the docshell inactive in onPause and back to active in onResume) will fix the issue.
Attachment #8911284 - Flags: review?(snorp)
Same as above, but with the JS moved to GeckoViewContent.
Attachment #8911284 - Attachment is obsolete: true
Attachment #8911284 - Flags: review?(snorp)
Attachment #8911296 - Flags: review?(snorp)
Comment on attachment 8911296 [details] [diff] [review]
Add setActive() to GeckoView

Review of attachment 8911296 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java
@@ +687,5 @@
>      }
>  
> +    /**
> +    * Set this GeckoView as active or inactive.
> +    * @param active A boolean determining whether the GeckoView should be active or inactive

Could probably use some better documentation here
Attachment #8911296 - Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/83fb17da1bd6
Add setActive() to GeckoView to make the DocShell active/inactive. r=snorp
https://hg.mozilla.org/mozilla-central/rev/83fb17da1bd6
https://hg.mozilla.org/mozilla-central/rev/e6bf3b8e155b
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Is that something we want to uplift in 57? Thanks
Flags: needinfo?(droeh)
Attached file log2-Android 8.txt
I'm still experiencing blank pages freezing, with a Huawei Nexus 6P (Android 8.0). Attached log for this device.
(In reply to Oana Horvath from comment #8)
> Created attachment 8915589 [details]
> log2-Android 8.txt
> 
> I'm still experiencing blank pages freezing, with a Huawei Nexus 6P (Android
> 8.0). Attached log for this device.

Can you list what PWAs you're using to test this? Thanks.
Flags: needinfo?(droeh) → needinfo?(oana.horvath)
The most common PWA's that were freezing: https://github-e.com, pokedex.org, ft.com. The last log was recorded with just https://github-e.com, being the only web app opened at the time. This one is freezing the most.
Flags: needinfo?(oana.horvath)
Dylan, so, what do we do here?
thanks
Flags: needinfo?(droeh)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Dylan, we should probably listen to low-memory events in the PWA activity and suspend the GeckoView (which is not yet possible).
Makes sense. I'm a bit worried that it's apparently so easy to hit an OOM with only a couple of PWAs active, though, and I'm still unable to reproduce.
Flags: needinfo?(droeh)
> W/Adreno-GSL: <sharedmem_gpumem_alloc_id:2735>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory

I think we're running out of address space here due to graphics mappings, which we've seen before. Maybe we can be smarter about managing textures when there are many windows open, but only one is shown.
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P1 → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: REOPENED → RESOLVED
Closed: 7 years ago3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: