Closed Bug 1489955 Opened 6 years ago Closed 6 years ago

Sporadic hangs in WebDriver:SetWindowRect

Categories

(Remote Protocol :: Marionette, defect, P2)

Version 3
defect

Tracking

(firefox65 fixed, firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox65 --- fixed
firefox66 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Depends on 1 open bug)

Details

(Keywords: hang)

In cases like bug 1489628 the command hangs and doesn't return. As result Firefox gets killed after the 360s without a reply from Marionette. > 11:26:42 INFO - 1536344802211 Marionette TRACE 97 -> [0,5,"WebDriver:GetWindowRect",{}] > 11:26:42 INFO - 1536344802213 Marionette TRACE 97 <- [1,5,null,{"x":4,"y":4,"width":1366,"height":768,"state":"maximized"}] > 11:26:42 INFO - 1536344802216 Marionette TRACE 97 -> [0,6,"WebDriver:ExecuteScript",{"scriptTimeout":null,"newSandbox":true,"args":[],"filename":"tests/testing/marionette/harness ... width: window.screen.availWidth,\n height: window.screen.availHeight,\n }","sandbox":null,"line":22}] > 11:26:42 INFO - 1536344802233 Marionette TRACE 97 <- [1,6,null,{"value":{"width":1366,"height":768}}] > 11:26:42 INFO - 1536344802237 Marionette TRACE 97 -> [0,7,"WebDriver:SetWindowRect",{"y":null,"x":null,"width":1356,"height":758}] Note this only happens for tests running on MacOS so far.
Blocks: 1489628
Priority: -- → P5
See Also: → 1491971
Blocks: 1433102
Depends on: 1492499
Should be fixed by Andreas' patch on bug 1492499.
Assignee: nobody → ato
Severity: normal → critical
Status: NEW → RESOLVED
Closed: 6 years ago
Keywords: hang
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
This is not completely fixed yet. I will mark a test failure as blocking in a moment.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla65 → ---
Blocks: 1507372
Assignee: ato → nobody
Blocks: 1509557
The problem as reported on this bug has been increased since the window manipulation changes have been landed. More and more high frequent intermittent failures appear as tracked by bugs on the dependency list. Andreas, will you have the time to look at the underlying problem? If not please tell us, so someone else can dive into it. Thanks.
Flags: needinfo?(ato)
Priority: P5 → P2
I wont have time to look at this within a reasonable timeframe. I will add some notes and observations about investigating this that can be useful. Most of the new intermittents we have seen following https://bugzilla.mozilla.org/show_bug.cgi?id=1492499 are related to Mn tests and test_window_rect.py specifically. Why are we not seeing the same amount of failures with WPT WebDriver tests? One theory I have is that test_window_rect.py is occassionally, though for what reason I dont know, started in the wrong state. In WPT we have much stronger guarantees that the browser is in a reasonable and safe state before running tests. The first step would be to make sure test_window_rect.py is in the right test before running the tests. My window manipulation changes did not change any code related to repositioning the window (window.moveTo), but it did attempt to make WebDriver:SetWindowRect indempotent. It is worth reviewing if this check is correct. Many of the failures are related to calling WebDriver:SetWindowRect after the window recovers from a different window state e.g. from being minimised, maximised, or fullscreen. That means exitFullscreen and/or restoreWindow could be wrong. I somewhat suspect we are not always receiving the expected events (for various reasons) and instead relying on the TimedPromises to time out. The arbitrary 1.5 second timeout of TimedPromise would explain why we are only seeing these problems intermittently. I hope this helps!
Flags: needinfo?(ato)
Setting needinfo for myself because I will have to take a look at this. First thing I might want to do is to add some more debug/trace logging so we get some more information about performance and reliability of the individual window manipulation commands.
Flags: needinfo?(hskupin)
Depends on: 1510940
Blocks: 1512909
Blocks: 1514616

(In reply to Henrik Skupin (:whimboo) from comment #5)

First thing I might want to do is to add some more debug/trace logging so we
get some more information about performance and reliability of the
individual window manipulation commands.

This will actually be done via bug 1510940. So we have to wait for it to land.

Flags: needinfo?(hskupin)

With bug 1478358 landed the "WebDriver:SetWindowRect" command no longer uses a timed promise to wait for a resize event. As such I cannot think of any hangs anymore. I also can no longer see this failure classified via Treeherder. So it should hopefully be fixed.

Assignee: nobody → hskupin
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Depends on: 1478358
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.