New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 736948 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

ChildProcessLauncherHelper keeps connections bound when they are already used

Project Member Reported by jcivelli@chromium.org, Jun 27 2017

Issue description

ChildProcessLauncherHelper when it binds to a child service and finds that the service is already bound (which can happen if that renderer service is already used by WebView), keep that service bound but not setup and connects again.
Keeping the service bound ensure the child connection allocator won't reuse it.
But that means even if the other client disconnects, the service will stay around until killed by the OOM since we are still bound to it.

A better solution would be to free that connection if it's already bound and move it to the end of the free connection slots so it is reused last.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 25 2017

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

commit f457ff988fd2f8606c68fa3e55d3af4b0bd1217a
Author: Jay Civelli <jcivelli@google.com>
Date: Tue Jul 25 20:11:05 2017

Clear connection when they are already used.

When allocating starting a child connection to a service already bound
to another client, unbind the connection and clear it from the
allocator. The connection is freed and pushed to the end of the
available slots.

Bug:  736948 
Change-Id: I550a198af038c67c841218c10144142863c285d3
Reviewed-on: https://chromium-review.googlesource.com/571278
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489409}
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/base/android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/base/android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/base/android/java/src/org/chromium/base/process_launcher/ChildProcessLauncher.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/base/android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/base/android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/public/android/java/src/org/chromium/content/browser/SpareChildConnection.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/public/android/junit/src/org/chromium/content/browser/SpareChildConnectionTest.java
[modify] https://crrev.com/f457ff988fd2f8606c68fa3e55d3af4b0bd1217a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java

Status: Fixed (was: Untriaged)

Sign in to add a comment