Closed
Bug 1506276
Opened 7 years ago
Closed 7 years ago
Android 7.0 x86 geckoview-junit perma-fail: TEST-UNEXPECTED-TIMEOUT | runjunit.py | Timed out after 2400 seconds after testScroll
Categories
(GeckoView :: General, defect, P3)
GeckoView
General
Tracking
(geckoview64 wontfix, firefox64 wontfix, firefox65 fixed)
RESOLVED
FIXED
mozilla65
People
(Reporter: gbrown, Assigned: eeejay)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
3.81 KB,
patch
|
Details | Diff | Splinter Review | |
2.05 KB,
patch
|
yzen
:
review+
|
Details | Diff | Splinter Review |
It looks like testScroll is hanging:
https://treeherder.mozilla.org/logviewer.html#?job_id=210879504&repo=mozilla-central&lineNumber=1537
[task 2018-11-09T18:48:13.736Z] 18:48:13 INFO - TEST-START | org.mozilla.geckoview.test.AccessibilityTest.testScroll
[task 2018-11-09T19:27:59.484Z] 19:27:59 WARNING - TEST-UNEXPECTED-TIMEOUT | runjunit.py | Timed out after 2400 seconds
Note that the geckoview-junit tests on Android 7.0 x86 are running as tier 3 tasks currently (because they keep failing): That means they are hidden by default and not sheriffed. Failures are not starred by sheriffs, so they don't show up in the intermittent-failures reports.
You can view the tasks on mozilla-central with:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&tier=1%2C2%2C3&searchStr=android%2C7.%2C0%2Cgeckoview-junit
![]() |
Reporter | |
Comment 1•7 years ago
|
||
![]() |
Reporter | |
Updated•7 years ago
|
Blocks: geckoview-junit-x86_64
![]() |
Reporter | |
Comment 2•7 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #1)
> I think the hang started in this range:
Yes. org.mozilla.geckoview.test.AccessibilityTest.testScroll started hanging with bug 1432019 (it had been failing cleanly earlier).
See Also: → 1432019
![]() |
Reporter | |
Comment 3•7 years ago
|
||
I tried skipping (@Ignore) testScroll, but then the timeout moved to noPendingCallbacks_withSpecificSession...and if I skip testScroll and noPendingCallbacks_withSpecificSession, then noPendingCallbacks hangs.
:kats -- Can you have a look, since we were not seeing this before bug 1432019?
Note that geckoview-junit on Android 7.0 x86 runs as tier 3, so is hidden by default on treeherder. You can view the tasks on mozilla-central with:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&tier=1%2C2%2C3&searchStr=android%2C7.%2C0%2Cgeckoview-junit
You can run locally with 'mach geckoview-junit'. More info at https://developer.mozilla.org/en-US/docs/Mozilla/Geckoview-Junit_Tests.
Flags: needinfo?(kats)
Comment 4•7 years ago
|
||
So bug 1432019 changes the thread on which we dispatch vsync events from some anonymous worker thread, to the main java UI thread. testScroll looks like it runs on the java UI thread, and does SystemClock.sleep calls between scrolls. So probably the vsync events are never getting dispatched because the UI thread is sleeping, and that causes everything to get jammed up. The test will need to be modified to relinquish the UI thread and post a runnable (or whatever the kotlin equivalent is) to do the rest of the work instead of sleeping and blocking the UI thread.
I'm not sure what the problem with noPendignCallbacks* is, it's not obvious to me what those tests are actually doing.
Flags: needinfo?(kats)
![]() |
Reporter | |
Comment 5•7 years ago
|
||
Thanks kats.
:eeejay - Can you follow-up, at least for testScroll?
Flags: needinfo?(eitan)
Comment 6•7 years ago
|
||
The noPendingCallback* tests look like they try to "open a session" which involves running the code at [1] on the main thread, which appears to be a blocking I/O call, maybe? So that will have the same problem in that will prevent vsync events from getting though and likely jam up stuff. The RDP connection code should probably be moved off the UI thread.
[1] https://searchfox.org/mozilla-central/rev/c0b26c40769a1e5607a1ae8be37fe64df64fc55e/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/rule/GeckoSessionTestRule.java#1234
Assignee | ||
Comment 7•7 years ago
|
||
This test ultimately synthesizes a scroll wheel event in the chrome process. The scroll events it listens for are dispatched directly from layout via nsIScrollPositionListener[1].
I reverted the patch that kats mentions locally, no luck. I'll look at this further..
1. https://searchfox.org/mozilla-central/source/accessible/generic/DocAccessible.cpp#629
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 9•7 years ago
|
||
Assignee | ||
Comment 10•7 years ago
|
||
:kats
I did what you suggested (stopped blocking main thread), and I got only partial success. It seems like there are a lot of timing issues with APZC that are not deterministic enough for tests. Attached above is a non-a11y test to show those two issues.
There are two (non-UI thread blocking) sleeps there that make the test pass, but they seem kind of arbitrary and I don't think its a good way to write tests. The first sleep is after the page load so that the APZC has a chance to settle down before the first scrollIntoView so that it does not interfere. The second one is between the scrollIntoView and the mouse wheel simulation. From a bunch of logging it looks like we can get caught in the crossfire between different IPC APZC updates between content and chrome.
I guess my question for kats is: is there a way to write such a test without arbitrary waits.
Note: The accessibility scroll test also needs to sleep for 100ms between tests, but that is a specific amount of time that is needed so that the a11y layer can distinguish one scroll from the next (a11y scroll events are throttled to no more than on in 100ms).
Flags: needinfo?(eitan) → needinfo?(kats)
Comment 11•7 years ago
|
||
We do have APIs that we use in APZ mochitests that do what you want without arbitrary waits (see e.g. [1] and [2] which would be most relevant to your current sleeps). However you'd need a bunch of plumbing to expose them properly to Java/Kotlin code. Is there any particular reason these tests need to be written on the Java side? Could you write them as mochitests instead?
[1] https://searchfox.org/mozilla-central/rev/d35199ef15ffa57d190886e20d5df6471faf0870/gfx/layers/apz/test/mochitest/apz_test_utils.js#312
[2] https://searchfox.org/mozilla-central/rev/d35199ef15ffa57d190886e20d5df6471faf0870/gfx/layers/apz/test/mochitest/apz_test_utils.js#127
Flags: needinfo?(kats)
Assignee | ||
Comment 12•7 years ago
|
||
We already have mochitests for the scroll events that run on desktop. This is more of a platform test to see that it works right on Android.
We actually can wait for JS promises in kotlin, but I don't think we have apz_test_utils.js available to us..
I'm going to propose we disable this test everywhere with a reference to this bug if we ever decide to try to tackle this.
Assignee | ||
Comment 13•7 years ago
|
||
Attachment #9027725 -
Flags: review?(yzenevich)
Comment 14•7 years ago
|
||
Comment on attachment 9027725 [details] [diff] [review]
Disable AccessibilityTest#testScroll until we figure out APZC. r?yzen
Review of attachment 9027725 [details] [diff] [review]:
-----------------------------------------------------------------
sounds good
Attachment #9027725 -
Flags: review?(yzenevich) → review+
Comment 15•7 years ago
|
||
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/31b4c8ac21fd
Disable AccessibilityTest#testScroll until we figure out APZC. r=yzen
![]() |
Reporter | |
Comment 16•7 years ago
|
||
We expect the other tests to hang still, right? Is there a plan for those?
Should we leave this bug open or file a new one?
Comment 17•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Comment 18•7 years ago
|
||
64=wontfix because we don't need to uplift this test fix to Beta.
status-firefox64:
--- → wontfix
Updated•7 years ago
|
Assignee: nobody → eitan
Comment hidden (Intermittent Failures Robot) |
Updated•7 years ago
|
Product: Firefox for Android → GeckoView
Updated•7 years ago
|
Keywords: intermittent-failure
Target Milestone: Firefox 65 → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•