New issue
Advanced search Search tips

Issue 683384 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

ClientOnPageFinishedTest#testCalledOnCancelingProvisionalLoad flakes on main waterfall

Project Member Reported by jbudorick@chromium.org, Jan 20 2017

Issue description

Timed out waiting for a callback:

org.chromium.android_webview.test.ClientOnPageFinishedTest#testCalledOnCancelingProvisionalLoad (run #1):
java.util.concurrent.TimeoutException: waitForCallback timed out!
	at org.chromium.base.test.util.CallbackHelper.waitForCallback(CallbackHelper.java:183)
	at org.chromium.base.test.util.CallbackHelper.waitForCallback(CallbackHelper.java:219)
	at org.chromium.android_webview.test.ClientOnPageFinishedTest.testCalledOnCancelingProvisionalLoad(ClientOnPageFinishedTest.java:486)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
	at org.chromium.base.test.BaseTestResult.runParameterized(BaseTestResult.java:161)
	at org.chromium.base.test.BaseTestResult.run(BaseTestResult.java:124)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)

this also appeared in the logcat:

01-16 16:31:20.433  3820  3872 W TestWebServer: java.net.SocketException: sendto failed: EBADF (Bad file number)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:546)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.IoBridge.sendto(IoBridge.java:515)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at java.net.PlainSocketImpl.write(PlainSocketImpl.java:504)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:37)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:92)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.impl.io.AbstractSessionOutputBuffer.flush(AbstractSessionOutputBuffer.java:99)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.impl.io.ContentLengthOutputStream.flush(ContentLengthOutputStream.java:106)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:82)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:102)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.apache.http.impl.AbstractHttpServerConnection.sendResponseEntity(AbstractHttpServerConnection.java:187)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at org.chromium.net.test.util.TestWebServer$ServerThread.run(TestWebServer.java:767)
01-16 16:31:20.433  3820  3872 W TestWebServer: Caused by: android.system.ErrnoException: sendto failed: EBADF (Bad file number)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.Posix.sendtoBytes(Native Method)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.Posix.sendto(Posix.java:206)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	at libcore.io.IoBridge.sendto(IoBridge.java:513)
01-16 16:31:20.433  3820  3872 W TestWebServer: 	... 10 more


see e.g. 
 - https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/37250
 - https://build.chromium.org/p/chromium.android/builders/Lollipop%20Tablet%20Tester/builds/6511
   (w/ logcat: https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.android%2FLollipop_Tablet_Tester%2F6511%2F%2B%2Flogcat_org.chromium.android_webview.test.ClientOnPageFinishedTest.testCalledOnCancelingProvisionalLoad_20170116T083114_0a294402)


Adding @RetryOnFailure
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 20 2017

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

commit ffd1a8bafeebab1509c83bd37cda834a0a15053e
Author: jbudorick <jbudorick@chromium.org>
Date: Fri Jan 20 22:44:54 2017

[android] Add @RetryOnFailure to one ClientOnPageFinishedTest.

BUG= 683384 
TBR=boliu@chromium.org

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

[modify] https://crrev.com/ffd1a8bafeebab1509c83bd37cda834a0a15053e/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java

Owner: gsennton@chromium.org
Huuuh, this is mine!
Testing to run this locally a bunch of times..
I've ran this test 20 times on a Nexus 6 running N without a single failure (though that was with a release-build).

John, is there an easy way of finding out what build flags the bots you linked to are using? AFAICT the bots are not building themselves, they're just using/extracting a previously built build?
Ping

Comment 6 by boliu@chromium.org, Feb 9 2017

Depends on which test bought you are looking at. If you know the "waterfall", then the builder is generally right next to the tester. These are the android waterfalls:

https://build.chromium.org/p/chromium.linux/console
https://build.chromium.org/p/chromium.android/console
Status: Assigned (was: Untriaged)
Still happening even with 3 retries:

https://uberchromegw.corp.google.com/i/chromium.android/builders/Lollipop%20Tablet%20Tester/builds/9941

Maybe try lollipop tablet -- it's slower and maybe reproduces things easier.
Labels: -Pri-3 Pri-2
I am disabling this test because it's failing pretty often on Lollipop Tablet Tester: https://chromium-review.googlesource.com/c/chromium/src/+/682181.

Looks like it's still flaky on other configs too, see link in the code review.

Comment 9 by boliu@chromium.org, Sep 25 2017

Labels: Proj-PlzNavigate
speculatively, plznavigate related as well?
Project Member

Comment 10 by bugdroid1@chromium.org, Sep 25 2017

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

commit 9ff85175e60bca93513c83c25597fe799be76601
Author: Maria Khomenko <mariakhomenko@chromium.org>
Date: Mon Sep 25 18:24:11 2017

Disabling flaky test.

Disabling ClientOnPageFinishedTest#testCalledOnCancelingProvisionalLoad,
which is flaking across a variety of configs:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webview_instrumentation_test_apk&tests=ClientOnPageFinishedTest.testCalledOnCancelingProvisionalLoad
and failing pretty consistently on Lollipop Tablet Tester.

Bug:  683384 
Change-Id: I3d08468e922eb59c16590a83cb7780d78dabd3f5
Reviewed-on: https://chromium-review.googlesource.com/682181
Reviewed-by: Selim Gurun <sgurun@chromium.org>
Commit-Queue: Maria Khomenko <mariakhomenko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504109}
[modify] https://crrev.com/9ff85175e60bca93513c83c25597fe799be76601/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java

Owner: ----
Status: Available (was: Assigned)
Cc: ntfschr@chromium.org
Owner: ntfschr@chromium.org
Status: Assigned (was: Available)
I'll take this. I think I know how to fix this.
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 16 2018

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

commit f14516de36a250e35cbd784185038bb32146eb91
Author: Nate Fischer <ntfschr@chromium.org>
Date: Sat Jun 16 00:33:09 2018

AW: fix and renable onPageFinished test

No change to production logic.

This fixes a bad test and reenables it. In the test, the server and test
were deadlocked: the server was waiting for the test to finish, while
the test couldn't finish because the server wouldn't serve the second
page.

Instead, let the server complete the request shortly after we invoke
stopLoading(). This unblocks the server, but still guarantees the load
will still be provisional at the time we invoke stopLoading().

  --num_retries=0 --break-on-failure --repeat=1000 \
  -f ClientOnPageFinishedTest#testCalledAfterRedirectedUrlIsOverridden

Bug:  683384 
Test: run_webview_instrumentation_test_apk \
Change-Id: I21be548fb1fd57724351fd372cc78d00062489b2
Reviewed-on: https://chromium-review.googlesource.com/1100547
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567840}
[modify] https://crrev.com/f14516de36a250e35cbd784185038bb32146eb91/android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment