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

Issue 654155 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Crash reports often dropped, due to failed logcat extraction

Project Member Reported by isherman@chromium.org, Oct 8 2016

Issue description

I recently introduced a regression in [ https://codereview.chromium.org/2282173003/ ], which causes logcat output to often fail to be read.  This is due to attempting to issue the command "logcat -d | tail -n 1024".  On Android, this doesn't work as I'd expected, and still manages to saturate the Process's output buffer.  This results in the Process never terminating, i.e. the thread is hung.

This issue is split off from issue 651600
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 10 2016

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

commit a8aba3c20875329d9f977253d5375552c33d6b4c
Author: isherman <isherman@chromium.org>
Date: Mon Oct 10 23:14:47 2016

[Android] Fix logcat extraction code.

Currently, logcat extraction often fails, because the Process's output
buffer gets saturated with the logcat output.  I've reimplemented the
code to manually grab the last N lines of the logcat output, and this
implementation should avoid the buffer saturation issue.

Note: When the logcat extraction fails, it actually causes the thread to
hang, which means that crash reports don't get processed!

BUG= 654155 
TEST=junit_tests
R=mariakhomenko@chromium.org

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

[modify] https://crrev.com/a8aba3c20875329d9f977253d5375552c33d6b4c/chrome/android/java/src/org/chromium/chrome/browser/crash/LogcatExtractionCallable.java
[modify] https://crrev.com/a8aba3c20875329d9f977253d5375552c33d6b4c/chrome/android/junit/src/org/chromium/chrome/browser/crash/LogcatExtractionCallableUnitTest.java

Owner: aska...@chromium.org
Hi Ashwini, could you please test this and see whether the issue is still reproducible following my CL?  I tested locally and it seemed to address the issue, but it would be great to test on a few of the devices that you have set up for testing.  Thanks!

Comment 3 by aska...@google.com, Oct 10 2016

Sure, I will test it on the next available tot/M56 build and update.
Owner: isherman@chromium.org
I tested the fix on 56.0.2887.3 and was not able to repro the issue.

Note: I was able to repro the issue on M55 build 55.0.2883.9 on the same device.
Labels: Merge-Request-55
Thanks Ashwini!

Comment 6 by dimu@chromium.org, Oct 11 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 13 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a2b5a6385d8e82c72df9a20375801bc90e136d0

commit 7a2b5a6385d8e82c72df9a20375801bc90e136d0
Author: Ilya Sherman <isherman@chromium.org>
Date: Thu Oct 13 22:07:54 2016

[Merge] [Android] Fix logcat extraction code.

Currently, logcat extraction often fails, because the Process's output
buffer gets saturated with the logcat output.  I've reimplemented the
code to manually grab the last N lines of the logcat output, and this
implementation should avoid the buffer saturation issue.

Note: When the logcat extraction fails, it actually causes the thread to
hang, which means that crash reports don't get processed!

BUG= 654155 
TEST=junit_tests
R=mariakhomenko@chromium.org

Review-Url: https://codereview.chromium.org/2400403002
Cr-Commit-Position: refs/heads/master@{#424277}
(cherry picked from commit a8aba3c20875329d9f977253d5375552c33d6b4c)

Review URL: https://codereview.chromium.org/2418923002 .

Cr-Commit-Position: refs/branch-heads/2883@{#97}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/7a2b5a6385d8e82c72df9a20375801bc90e136d0/chrome/android/java/src/org/chromium/chrome/browser/crash/LogcatExtractionCallable.java
[modify] https://crrev.com/7a2b5a6385d8e82c72df9a20375801bc90e136d0/chrome/android/junit/src/org/chromium/chrome/browser/crash/LogcatExtractionCallableUnitTest.java

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified fix in M55 - 55.0.2883.18

Project Member

Comment 10 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a2b5a6385d8e82c72df9a20375801bc90e136d0

commit 7a2b5a6385d8e82c72df9a20375801bc90e136d0
Author: Ilya Sherman <isherman@chromium.org>
Date: Thu Oct 13 22:07:54 2016

[Merge] [Android] Fix logcat extraction code.

Currently, logcat extraction often fails, because the Process's output
buffer gets saturated with the logcat output.  I've reimplemented the
code to manually grab the last N lines of the logcat output, and this
implementation should avoid the buffer saturation issue.

Note: When the logcat extraction fails, it actually causes the thread to
hang, which means that crash reports don't get processed!

BUG= 654155 
TEST=junit_tests
R=mariakhomenko@chromium.org

Review-Url: https://codereview.chromium.org/2400403002
Cr-Commit-Position: refs/heads/master@{#424277}
(cherry picked from commit a8aba3c20875329d9f977253d5375552c33d6b4c)

Review URL: https://codereview.chromium.org/2418923002 .

Cr-Commit-Position: refs/branch-heads/2883@{#97}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/7a2b5a6385d8e82c72df9a20375801bc90e136d0/chrome/android/java/src/org/chromium/chrome/browser/crash/LogcatExtractionCallable.java
[modify] https://crrev.com/7a2b5a6385d8e82c72df9a20375801bc90e136d0/chrome/android/junit/src/org/chromium/chrome/browser/crash/LogcatExtractionCallableUnitTest.java

Comment 11 by dimu@google.com, Nov 4 2016

[Automated comment] removing mislabelled merge-merged-2840

Comment 12 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840
Having similar issue generating crash ID on P8 Lite/5.0.1 with chrome beta release 55.0.2883.38

http://go/chrome-androidlogs/1/6/654155
Added files:
crashID_M55.txt
crashID__M55.png



Comment 14 Deleted

Also able to repro on Lenovo K5/MRA58K
Hi ramine@, could you please clarify exactly what issue you're seeing?  Thanks!

Sign in to add a comment