Closed Bug 1283193 Opened 6 years ago Closed 3 years ago

Intermittent dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html | Test timed out.

Categories

(Core :: DOM: Device Interfaces, defect, P5)

defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox50 --- wontfix
firefox51 --- wontfix
firefox52 --- wontfix
firefox53 --- affected
firefox54 --- affected

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 2 obsolete files)

See Also: → 1282874
Bulk assigning P3 to all open intermittent bugs without a priority set in Firefox components per bug 1298978.
Priority: -- → P3
Michael, can you please look into these ongoing failures?
Flags: needinfo?(cleu)
See Also: → 1283194, 1283195
Assignee: nobody → cleu
Flags: needinfo?(cleu)
I think the timeout is caused by a racing condition between AddEventListener and the actual test events but I cannot reproduce it on my local machine.

This patch add logs in critical areas, I'll push it to try and see whether it is a racing condition or not.
OK, I reproduced the mochitest failure on tryserver with my log patch.

It turns out that the Gamepad events were never reach DOM side at all.

It seems that there are possibility that we synthesize test events before GamepadEventChannel when er are performing Mochitest.

This patch adds buffer mechanism which ensures all events can be dispatched.
Attachment #8803253 - Flags: review?(kyle)
Attachment #8803253 - Flags: review?(ted)
Comment on attachment 8803253 [details] [diff] [review]
Add buffer mechanism in GamepadPlatformService to prevent dispatch failure in Mochitest.

Review of attachment 8803253 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/gamepad/GamepadPlatformService.cpp
@@ +172,5 @@
> +  FlushPendingEvents();
> +}
> +
> +void
> +GamepadPlatformService::FlushPendingEvents()

You might want to note that this should only be called with the mutext held. You're only calling it in one place right now, which is fine, but just in case someone refactors in the future.

(Would be nice if this was all Rust and we could enforce that!)
Attachment #8803253 - Flags: review?(ted)
Attachment #8803253 - Flags: review?(kyle)
Attachment #8803253 - Flags: review+
Add comment to note that FlushPendingEvents must be called with Mutex held.
Attachment #8803253 - Attachment is obsolete: true
Attachment #8803750 - Flags: review+
Attachment #8802398 - Attachment is obsolete: true
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dbedfec33396
Add buffer mechanism in GamepadPlatformService to prevent dispatch failure in Mochitest. r=ted
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/dbedfec33396
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
OrangeFactor is looking good! Please request Aurora approval on this when you get a chance.
Flags: needinfo?(cleu)
Duplicate of this bug: 1283194
Duplicate of this bug: 1283195
Comment on attachment 8803750 [details] [diff] [review]
Add buffer mechanism in GamepadPlatformService to prevent dispatch failure in Mochitest v2. r=ted

Review of attachment 8803750 [details] [diff] [review]:
-----------------------------------------------------------------

[Feature/regressing bug #] Bug 1283193: Intermittent dom/tests/mochitest/gamepad/test_gamepad_frame_state_sync.html | Test timed out. - Treeherder Bug Filer <intermittent-bug-filer@mozilla.bugs>

[User impact if declined] There will be intermittent Mochitest failure about gamepad.

[Describe test coverage new/current, TBPL] Mochitest abbout gamepad

[Risks and why] Low - This patch is dedicated for Mochitest, only mochitest have chances executing this codes.

[String/UUID change made/needed] none
Attachment #8803750 - Flags: approval-mozilla-aurora?
Flags: needinfo?(cleu)
This hit on m-c again today :(
https://treeherder.mozilla.org/logviewer.html#?job_id=5398747&repo=mozilla-central
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla52 → ---
Attachment #8803750 - Flags: approval-mozilla-aurora?
Michael, can you please take another look here? These failures continue to persist :(
Hi Ryan,
I suspect it is caused by a potential race condition in Gamepad's test backend, but I cannot reproduce it.

Now add logs and try to reproduce it on tryserver but no luck yet.

I'll continue trying to reproduce it with my logs.

By the way, it seems that the last appearance of this failure only occur on aurora and beta, maybe some other patch make it happens less frequently or just mitigate it?
Flags: needinfo?(cleu)
Mass wontfix for bugs affecting firefox 52.
Assignee: cleu → nobody
Priority: P3 → P5
Component: DOM → DOM: Device Interfaces
https://wiki.mozilla.org/Bug_Triage#Intermittent_Test_Failure_Cleanup
Status: REOPENED → RESOLVED
Closed: 5 years ago3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.