New issue
Advanced search Search tips

Issue 691846 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

WebAPK renderer creation failure causes all subsequent renderer creations to fail

Project Member Reported by pkotw...@chromium.org, Feb 14 2017

Issue description

 Issue 691709  caused WebApkSandboxedProcessService#onBind() to return null due to a null WebApkSandboxedProcessService#mChildProcessServiceImplInstance

Because the WebAPK renderer being created was ChildProcessLauncher#sSpareSandboxedConnection this prevented the creation of all subsequent (non WebAPK) renderers. Attempting to create a new renderer would cause ChildProcessConnection#startInternal() to spin on while (sSpareConnectionStarting) {}
 
Assigning to boliu@

I am unsure whether this bug is worth fixing

From ChildProcessConnectionImpl I don't know how to detect a case when ChildProcessConnectionImpl#onServiceConnected() will never be called

The best solution that I can think of is to call ChildProcessConnection.StartCallback#onChildStartFailed() if too much time has elapsed (e.g. 10 seconds)
Cc: pkotw...@chromium.org
Components: Mobile>WebAPKs
Owner: boliu@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by boliu@chromium.org, Feb 14 2017

So what happens in the browser end when onBind returns null? onServiceConnected never gets called?

Why does webapk need to do that?

Comment 4 by boliu@chromium.org, Feb 14 2017

> The best solution that I can think of is to call ChildProcessConnection.StartCallback#onChildStartFailed() if too much time has elapsed (e.g. 10 seconds)

Absolutely no timeouts

Comment 5 by boliu@chromium.org, Feb 14 2017

Cc: rsesek@chromium.org
Labels: OS-Android
+rsesek

so waiting for the warm up to finish is another one of those really odd things in the CL to support webview

I think it's totally ok to simply not use the spare warm up connection if it's not ready, rather than having this potential deadlock

Comment 6 by rsesek@chromium.org, Feb 14 2017

> So what happens in the browser end when onBind returns null? onServiceConnected never gets called?

Yes, onServiceConnected isn't called if onBind returns null.

> I think it's totally ok to simply not use the spare warm up connection if it's not ready, rather than having this potential deadlock

Where is the deadlock occurring (don't see it mentioned on this bug)?

Comment 7 by boliu@chromium.org, Feb 14 2017

> Where is the deadlock occurring (don't see it mentioned on this bug)?

The while (sSpareConnectionStarting) loop will never exit

Comment 8 by boliu@chromium.org, Feb 14 2017

also also.. WebApkSandboxedProcessService returns null when there's something with the reflection, shouldn't it just crash in that case? what's the point of keeping the service process alive when it doesn't even initialize?

Comment 9 by boliu@chromium.org, Feb 14 2017

Discussed on https://codereview.chromium.org/2693893006/, really can't remove the wait due to various things
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/250eb5097bfcc2d24bf814ece2b48946b90cdec8

commit 250eb5097bfcc2d24bf814ece2b48946b90cdec8
Author: boliu <boliu@chromium.org>
Date: Wed Feb 15 06:06:42 2017

webapk: Don't swallow onbind exceptions

Browser side can't deal with returning null from onbind. Plus any
exception there is already catastrophic, there is no way to recover from
that anyway.

BUG= 691846 

Review-Url: https://codereview.chromium.org/2699443003
Cr-Commit-Position: refs/heads/master@{#450580}

[modify] https://crrev.com/250eb5097bfcc2d24bf814ece2b48946b90cdec8/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkSandboxedProcessService.java

Comment 11 by boliu@chromium.org, Feb 15 2017

Status: Fixed (was: Assigned)

Sign in to add a comment