New issue
Advanced search Search tips

Issue 769274 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: ----



Sign in to add a comment

org.chromium.base.DiscardableReferencePoolTest#testReferenceGCd is flaky

Project Member Reported by vitaliii@chromium.org, Sep 27 2017

Issue description

The log is

============
[ RUN      ] org.chromium.base.DiscardableReferencePoolTest.testReferenceGCd
java.lang.AssertionError: expected null, but was:<java.lang.Object@34136bd1>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotNull(Assert.java:755)
	at org.junit.Assert.assertNull(Assert.java:737)
	at org.junit.Assert.assertNull(Assert.java:747)
	at org.chromium.base.DiscardableReferencePoolTest.testReferenceGCd(DiscardableReferencePoolTest.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:515)
	at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:316)
	at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:236)
	at org.robolectric.RobolectricTestRunner.runChild(RobolectricTestRunner.java:41)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:176)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.chromium.testing.local.GtestComputer$GtestSuiteRunner.run(GtestComputer.java:46)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at org.chromium.testing.local.JunitTestMain.main(JunitTestMain.java:105)
[   FAILED ] org.chromium.base.DiscardableReferencePoolTest.testReferenceGCd (16 ms)
============
Disabling the test.
The CL is https://chromium-review.googlesource.com/c/chromium/src/+/687015. Instead of disabling I disaded to add @RetryOnFailure.
Owner: bauerb@chromium.org
Status: Assigned (was: Started)
bauerb@, could you have a look (since you've added the test)?
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 27 2017

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

commit 57b6178a21fd401555a43125548250c30656456b
Author: vitaliii <vitaliii@chromium.org>
Date: Wed Sep 27 13:24:15 2017

Retry on failure DiscardableReferencePoolTest#testReferenceGCd (flaky).

org.chromium.base.DiscardableReferencePoolTest#testReferenceGCd is very
lightly flaky (2 fails out of 30 builds), thus, not disabling, but
retrying.

TBR: bauerb@chromium.org,agrieve@chromium.org
Bug: 769274
Change-Id: Ibe00fbc87796ca2571b9b9d8312ac37c248f00cb
Reviewed-on: https://chromium-review.googlesource.com/687015
Reviewed-by: vitaliii <vitaliii@chromium.org>
Commit-Queue: vitaliii <vitaliii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504643}
[modify] https://crrev.com/57b6178a21fd401555a43125548250c30656456b/base/android/junit/src/org/chromium/base/DiscardableReferencePoolTest.java

Labels: -Sheriff-Chromium

Comment 7 by bauerb@chromium.org, Sep 27 2017

Cc: agrieve@chromium.org torne@chromium.org
Components: Test>Android
Labels: -OS-Linux OS-Android
Ugh, garbage collection :-(

This is probably one of those things where the method doesn't actually _guarantee_ that a GC is going to happen...

Adding some random people who might know more about JVM (note that these tests are running on a Linux desktop and _not_ on the Android JVM, BTW).
Some commentary about this here:
https://stackoverflow.com/questions/28475391/why-this-code-does-not-ensure-that-a-full-garbage-collection-has-been-done

I'd guess this test is never not going to be flakey, so we should just delete it (or disable it so that it can be manually run if ever changed).
Owner: ----
Status: Untriaged (was: Assigned)
Bulk edit: Moving back into the untriaged pool, as I'm leaving the project.

Sign in to add a comment