Closed Bug 1785377 Opened 2 years ago Closed 8 months ago

Intermittent /webdriver/tests/classic/switch_to_parent_frame/switch.py | single tracking bug

Categories

(Remote Protocol :: Marionette, defect, P3)

Default
defect
Points:
2

Tracking

(firefox126 fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: jmaher, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [webdriver:m11], [wptsync upstream])

Attachments

(4 files, 1 obsolete file)

No description provided.

Additional information about this bug failures and frequency patterns can be found by running: ./mach test-info failure-report --bug 1785377

Severity: normal → S3
Moving bug to Remote Protocol::Marionette component per bug 1815831.
Component: geckodriver → Marionette
Product: Testing → Remote Protocol

All the latest failures on this issue show that the failure happens due to an early abort of WebDriver:ElementClick due to the actor being destroyed before the actual click event has been received by Marionette. Means the top-level browsing context that will be removed by the click is still present:

https://treeherder.mozilla.org/logviewer?job_id=427006217&repo=mozilla-central&lineNumber=124843-124856

[task 2023-08-25T05:25:35.307Z] 05:25:35     INFO - PID 24695 | 1692941135305	Marionette	DEBUG	0 -> [0,64,"WebDriver:ElementClick",{"id":"44792f43-9c48-4c7f-a19f-6ef635674d5c"}]
[task 2023-08-25T05:25:35.391Z] 05:25:35     INFO - PID 24695 | 1692941135390	Marionette	TRACE	[8589934595] Received event pagehide for https://web-platform.test:8443/webdriver/tests/support/html/deleteframe.html
[task 2023-08-25T05:25:35.393Z] 05:25:35     INFO - PID 24695 | 1692941135392	Marionette	TRACE	[8589934595] Querying "clickElement" failed with AbortError, returning "null" as fallback
[task 2023-08-25T05:25:35.394Z] 05:25:35     INFO - PID 24695 | 1692941135392	Marionette	TRACE	Canceled page load listener because browsing context with id 8589934595 has been removed
[task 2023-08-25T05:25:35.394Z] 05:25:35     INFO - PID 24695 | 1692941135392	Marionette	DEBUG	0 <- [1,64,null,{"value":null}]
[task 2023-08-25T05:25:35.395Z] 05:25:35     INFO - PID 24695 | 1692941135393	webdriver::server	DEBUG	<- 200 OK {"value":null}
[task 2023-08-25T05:25:35.395Z] 05:25:35     INFO - PID 24695 | 1692941135394	webdriver::server	DEBUG	-> POST /session/86ca332a-380b-4c06-a4bd-b0ee66840bed/frame/parent {}
[task 2023-08-25T05:25:35.395Z] 05:25:35     INFO - PID 24695 | 1692941135395	Marionette	DEBUG	0 -> [0,65,"WebDriver:SwitchToParentFrame",{}]
[task 2023-08-25T05:25:35.396Z] 05:25:35     INFO - PID 24695 | 1692941135395	Marionette	DEBUG	0 <- [1,65,null,{"value":null}]
[task 2023-08-25T05:25:35.397Z] 05:25:35     INFO - PID 24695 | 1692941135395	webdriver::server	DEBUG	<- 200 OK {"value":null}
[task 2023-08-25T05:25:35.416Z] 05:25:35     INFO - PID 24695 | 1692941135414	Marionette	TRACE	Received DOM event click for [object HTMLInputElement]
[task 2023-08-25T05:25:35.418Z] 05:25:35     INFO - PID 24695 | 1692941135417	Marionette	TRACE	[8589934595] MarionetteCommands actor destroyed for window id 8589934600
[task 2023-08-25T05:25:35.419Z] 05:25:35     INFO - PID 24695 | 1692941135417	Marionette	TRACE	[8589934594] MarionetteCommands actor destroyed for window id 8589934598

All those failures are recently on Linux only.

Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Pushed by aborovova@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfea5c2f2737 [wdspec] Wait until parent iframe is gone. r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42247 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Upstream PR merged by moz-wptsync-bot
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Probably the race here comes from the fact that the iframe is removed before the parent frame, and as such we can still switch to it once the button is gone. Maybe we should run some script evaluation to fetch an element from the parent frame and wait until it returns the no such window error?

Duplicate of this bug: 1856195

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #59)

Probably the race here comes from the fact that the iframe is removed before the parent frame, and as such we can still switch to it once the button is gone. Maybe we should run some script evaluation to fetch an element from the parent frame and wait until it returns the no such window error?

This actually wont work as well if the currently selected browsing context is gone because we won't be able to send a command anymore. I'm actually not sure how we can solve this problem at all for WebDriver classic. By using a BiDi script execution call we could find out when the parent is closed, but it's not available here.

As such I feel that we may have to mark this test as intermittent failing especially for slow running builds which include debug, ccov, asan, and tsan. I'll attach a patch to get the manifest file updated.

Summary: Intermittent /webdriver/tests/switch_to_parent_frame/switch.py | single tracking bug → Intermittent /webdriver/tests/classic/switch_to_parent_frame/switch.py | single tracking bug
Attachment #9357018 - Attachment description: Bug 1785377 - [wdspec] Expect test "test_no_parent_browsing_context" to fail for slow running builds. → Bug 1785377 - [wdspec] Expect test "test_no_parent_browsing_context" to intermittently fail for slow running builds.
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e7b01fe0243e [wdspec] Expect test "test_no_parent_browsing_context" to intermittently fail for slow running builds. r=webdriver-reviewers,jgraham
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED

Hello Henrik! Could you please take a look at this? It looks like it still failing with that failure line.

Thank you!

Status: RESOLVED → REOPENED
Flags: needinfo?(hskupin)
Resolution: FIXED → ---
Target Milestone: 120 Branch → ---

(In reply to Serban Stanca [:SerbanS] from comment #65)

Hello Henrik! Could you please take a look at this? It looks like it still failing with that failure line.

Looks like it's indeed failing for opt builds but so far it seems to be way less frequent. I would suggest that we keep an eye on it over the next days / weeks and make a decision later on if we also want to mark opt builds as pass and fail. As best we should have used a separate bug for the patches already landed.

Assignee: aborovova → nobody
Status: REOPENED → NEW
Flags: needinfo?(hskupin)

Should we consider removing this test if we assert a behavior which is racy? A test should reliably pass regardless of the performance of the platform.

(In reply to Julian Descottes [:jdescottes] from comment #68)

Should we consider removing this test if we assert a behavior which is racy? A test should reliably pass regardless of the performance of the platform.

Given that this test cannot be run with classic on it's own we discussed with Chrome folks and will make a special test that uses both classic and BiDi. As such we need to move it to a new folder under webdriver/tests/.

Attachment #9383680 - Attachment is obsolete: true
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/01b2b4aa152b [wdspec] Move classic vs bidi interop tests to /webdriver/tests/interop. r=webdriver-reviewers,Sasha https://hg.mozilla.org/integration/autoland/rev/a2060430453f [wdspec] Fix race condition in switch to parent frame if parent was removed. r=webdriver-reviewers,Sasha
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45604 for changes under testing/web-platform/tests
Points: --- → 2
Whiteboard: [webdriver:m11]
Status: ASSIGNED → RESOLVED
Closed: 1 year ago8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m11] → [webdriver:m11], [wptsync upstream]
Blocks: 1743116
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: