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

Issue 749149 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Chrome on Android crashing on ChildConnectionAllocator.removeListener assert

Project Member Reported by tedc...@chromium.org, Jul 26 2017

Issue description

Tested on Nexus 5X (may only repro on phones).
Synced to: 76cf4f1fd0db79aeb3c6c08d92afcae00b0cd08e

Steps to reproduce: 
1.) Turn on Android's "Don't keep activities" setting
2.) Menu -> Bookmarks
3.) Android Back button
4.) Menu -> New Incognito Tab
5.) Menu -> Bookmarks

Observed behavior: 
Crashes on assert
07-26 19:59:07.197 24073 24097 E AndroidRuntime: FATAL EXCEPTION: Chrome_ProcessLauncherThread
07-26 19:59:07.197 24073 24097 E AndroidRuntime: Process: com.google.android.apps.chrome, PID: 24073
07-26 19:59:07.197 24073 24097 E AndroidRuntime: java.lang.AssertionError
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at org.chromium.base.process_launcher.ChildConnectionAllocator.removeListener(ChildConnectionAllocator.java:304)
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at org.chromium.content.browser.ChildProcessLauncherHelper$6$1.run(ChildProcessLauncherHelper.java:388)
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:789)
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:98)
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
07-26 19:59:07.197 24073 24097 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:65)
07-26 19:59:07.210   787  3580 W ActivityManager:   Force finishing activity com.google.android.apps.chrome/org.chromium.chrome.browser.bookmarks.BookmarkActivity

Expected behavior: 
Not crash :-)

Frequency: 
100%

Additional comments: 

 

Comment 1 by boliu@chromium.org, Jul 26 2017

this is because onConnectionFreed posts removing the listener. If the last one is removed before the second one tries to remove this listener, then this could happen

but I think other than asserts, this doesn't actually matter a whole lot

maybe fix by making sure there is only one pending runnable to remove the listener.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 27 2017

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

commit 973cae69ecab7a655ea91cdb3dca09ed046c6b2d
Author: Jay Civelli <jcivelli@google.com>
Date: Thu Jul 27 23:37:14 2017

CPLH could remove the connection allocator listener more than once.

When 2 connections were stopped consecutively, the
ChildProcessLauncherHelper could end up removing the
ChildConnectionAllocation listener more than once.

Bug:  749149 
Change-Id: I76ebf4f3818cd6a8542bd4b2bcccb45ae14d3e69
Reviewed-on: https://chromium-review.googlesource.com/588380
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490112}
[modify] https://crrev.com/973cae69ecab7a655ea91cdb3dca09ed046c6b2d/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
[modify] https://crrev.com/973cae69ecab7a655ea91cdb3dca09ed046c6b2d/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment