Closed
Bug 1475586
Opened 7 years ago
Closed 7 years ago
Saving GeckoView state blocks indefinitely sometimes
Categories
(GeckoView :: General, enhancement, P1)
Tracking
(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 wontfix, firefox63 wontfix)
RESOLVED
WONTFIX
| Tracking | Status | |
|---|---|---|
| firefox-esr52 | --- | unaffected |
| firefox-esr60 | --- | unaffected |
| firefox61 | --- | unaffected |
| firefox62 | --- | wontfix |
| firefox63 | --- | wontfix |
People
(Reporter: sebastian, Assigned: jchen)
References
Details
(Whiteboard: [geckoview:klar:p1])
In Focus (and the components sample browser) we sometimes see GeckoView block indefinitely when we save the state from onPause(). This leads to the UI thread blocking and the app freezing.
It feels like this happens especially if GeckoView is currently loading pages while we go to the background and want to save the state (Can't we save until the load has finished?).
In Focus we use saveState/restoreState when switching tabs. We tried to implement workaround that will save GeckoSession (Parcelable) in a Bundle instead of the state or just keeping and re-using GeckoSession. But this triggers bug 1472140.
| Reporter | ||
Comment 1•7 years ago
|
||
I can reproduce the ANR pretty frequently by following those STR:
* Make sure Focus/Klar is not running
* Open a link from a third-party app
* Background Focus/Klar almost immediately (Depends on timing here, definitely do not wait for any website to load)
* Resume the app
-> ANR
In the logs I see:
> Gecko I Attempting load of libEGL.so
> Adreno I QUALCOMM build : 984b9a6, Ibe1bf21abc
> I Build Date : 06/04/18
> I OpenGL ES Shader Compiler Version: EV031.24.00.00
> I Local Branch : googldrp
> I Remote Branch :
> I Remote Branch :
> I Reconstruct Branch :
> I Build Config : S L 4.0.10 AArch32
> SKDBG E >> SAVE STATE >> START
> Adreno I PFP: 0x005ff110, ME: 0x005ff066
> ConfigStore I android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
> I android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
> GeckoSysInfo D System memory: 3762MB.
>ViewTelemetryController D observed internal-telemetry-geckoview-load-complete - ready to handle telemetry requests
> GeckoThread D State changed to LAUNCHED
> I preparing to run Gecko
> D State changed to MOZGLUE_READY
> GeckoLibLoad E Load sqlite start
> GeckoLinker W /data/app/org.mozilla.klar.debug-KXzUNFPk3jH8sRm0TM_-og==/base.apk!/assets/armeabi-v7a/libnss3.so: >Relocation to NULL @0x00119ea0 for sy
> mbol "__cxa_type_match"
> GeckoLibLoad E Load sqlite done
> E Load nss start
> E Load nss done
> GeckoLinker W /data/app/org.mozilla.klar.debug-KXzUNFPk3jH8sRm0TM_-og==/base.apk!/assets/armeabi-v7a/liblgpllibs.so: Relocation to NULL @0x0000a1b4 fo
> r symbol "__cxa_type_match"
> GeckoLibLoad E Loaded libs in 34.002920ms total, 10ms(30ms) user, 6ms(13ms) system, 0(0) faults
> GeckoThread D State changed to LIBS_READY
> GeckoProcessManager E Cannot connect to process tab
>eckoServiceChildProcess I Service has been unbound. Stopping.
> Process I Sending signal. PID: 29908 SIG: 9
> illa.klar.debu I Thread[3,tid=29884,WaitingInMainSignalCatcherLoop,Thread*=0xeb510c00,peer=0x12dc0000,"Signal >Catcher"]: reacting to signal 3
> I Wrote stack traces to '[tombstoned]'
Comment 2•7 years ago
|
||
Sounds bad! [geckoview:klar:p1] because this bug is a Focus+GV blocker.
status-firefox61:
--- → unaffected
status-firefox62:
--- → affected
status-firefox63:
--- → affected
status-firefox-esr52:
--- → unaffected
status-firefox-esr60:
--- → unaffected
Priority: -- → P1
Whiteboard: [geckoview:klar] → [geckoview:klar:p1]
Updated•7 years ago
|
Assignee: nobody → nchen
| Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #1)
> I can reproduce the ANR pretty frequently by following those STR:
>
> * Make sure Focus/Klar is not running
> * Open a link from a third-party app
> * Background Focus/Klar almost immediately (Depends on timing here,
> definitely do not wait for any website to load)
> * Resume the app
> -> ANR
>
> In the logs I see:
>
> > GeckoProcessManager E Cannot connect to process tab
> >eckoServiceChildProcess I Service has been unbound. Stopping.
This particular deadlock is happening because Gecko is starting up while the UI thread is blocked. Gecko uses the UI thread when creating new e10s processes, but because the UI thread is blocked, process creation fails ("Cannot connect to process tab"), and we never deliver the `saveState` call, leading to the deadlock.
There are workarounds for this issue (adding a timeout, check if Gecko is starting, etc.) but I think it's best to treat blocking `saveState` as unsafe and not do that in general. For the case of Focus, that would mean fixing bug 1472140 so it wouldn't need to use `saveState`.
| Assignee | ||
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
You need to log in
before you can comment on or make changes to this bug.
Description
•