New issue
Advanced search Search tips

Issue 671170 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocked on:
issue 669999



Sign in to add a comment

Flaky linting on the Android build bot

Project Member Reported by peter@chromium.org, Dec 5 2016

Issue description

This happened a bunch of times in the past 50 runs:

https://build.chromium.org/p/chromium/builders/Android?numbuilds=200

https://build.chromium.org/p/chromium/builders/Android/builds/65537 (case 1)
https://build.chromium.org/p/chromium/builders/Android/builds/65512 (case 1)
https://build.chromium.org/p/chromium/builders/Android/builds/65498 (case 2)
https://build.chromium.org/p/chromium/builders/Android/builds/65478 (case 2)

I can see two different stack traces:

(1)
Exception in thread "main" java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
	at com.android.tools.lint.checks.TypoLookup.readData(TypoLookup.java:280)
	at com.android.tools.lint.checks.TypoLookup.<init>(TypoLookup.java:225)
	at com.android.tools.lint.checks.TypoLookup.get(TypoLookup.java:186)
	at com.android.tools.lint.checks.TypoLookup.get(TypoLookup.java:124)
	at com.android.tools.lint.checks.TypoDetector.beforeCheckFile(TypoDetector.java:158)
	at com.android.tools.lint.client.api.ResourceVisitor.visitFile(ResourceVisitor.java:149)
	at com.android.tools.lint.client.api.LintDriver.checkResourceFolder(LintDriver.java:1723)
	at com.android.tools.lint.client.api.LintDriver.checkResFolder(LintDriver.java:1672)
	at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:1030)
	at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:908)
	at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:436)
	at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:377)
	at com.android.tools.lint.LintCliClient.run(LintCliClient.java:131)
	at com.android.tools.lint.Main.run(Main.java:674)
	at com.android.tools.lint.Main.main(Main.java:118)

(2)
Exception in thread "main" java.nio.BufferUnderflowException
	at java.nio.Buffer.nextGetIndex(Buffer.java:492)
	at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:249)
	at com.android.tools.lint.checks.TypoLookup.readData(TypoLookup.java:247)
	at com.android.tools.lint.checks.TypoLookup.<init>(TypoLookup.java:225)
	at com.android.tools.lint.checks.TypoLookup.get(TypoLookup.java:186)
	at com.android.tools.lint.checks.TypoLookup.get(TypoLookup.java:124)
	at com.android.tools.lint.checks.TypoDetector.beforeCheckFile(TypoDetector.java:158)
	at com.android.tools.lint.client.api.ResourceVisitor.visitFile(ResourceVisitor.java:149)
	at com.android.tools.lint.client.api.LintDriver.checkResourceFolder(LintDriver.java:1723)
	at com.android.tools.lint.client.api.LintDriver.checkResFolder(LintDriver.java:1672)
	at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:1030)
	at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:908)
	at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:436)
	at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:377)
	at com.android.tools.lint.LintCliClient.run(LintCliClient.java:131)
	at com.android.tools.lint.Main.run(Main.java:674)
	at com.android.tools.lint.Main.main(Main.java:118)
 

Comment 1 by ricea@chromium.org, Dec 6 2016

Cc: agrieve@chromium.org
 Issue 671368  has been merged into this issue.
Not sure this is worth investigating until we update the version of lint we're using to a more modern version (https://bugs.chromium.org/p/chromium/issues/detail?id=669999).

This is blocked on bots supporting java 8 though.
Blockedon: 669999
Given that this is flakily failing on the main waterfall, it's definitely worth investigating.
Complementing: this failure immediately closes the tree. Please try to handle it ASAP.
 Issue 671599  has been merged into this issue.
All of the failures except for one fail on media_java__lint.

Given the failure is in "TypoLookup", I suspect someone checked in code that has a typo.

Might fix it to suppress this lint check until lint is updated to a newer version?
How do I find the actual file with the typo? Can I run it locally to identify it?
This just failed again:
https://uberchromegw.corp.google.com/i/chromium/builders/Android/builds/65597/steps/compile/logs/stdio

Note that there are successful builds between the ones that fail the linter.  So not sure it's a typo in the code, unless we don't lint on each build?
We do lint on each build.
Sorry - I should have time to look at this tomorrow, but not today.

Not sure how to figure out which file it is. I'm thinking the best thing to do is figure out which lint check is triggering the bug, and add it to:
https://cs.chromium.org/chromium/src/build/android/lint/suppressions.xml

The bug looks like probably a thread-safety thing, so happens some but not all of the time.
Owner: agrieve@chromium.org
Status: Assigned (was: Available)
Hopeful fix here: https://codereview.chromium.org/2561553003/#

Let's keep an eye out and I'll close if no new reports come in for the next few days.
Actually, I'm not positive the given patch disables the path (possible that it still runs but warnings are silenced). 

http://tools.android.com/tips/lint

Shows that there's a --disable flag that might be more effective. 

Let's wait and see...
Cc: estevenson@chromium.org
Status: Fixed (was: Assigned)
6 days with no complaints. Assuming fixed.

Sign in to add a comment