Closed Bug 1510696 Opened 6 years ago Closed 6 years ago

Avoid hard-coding reftest window size in Marionette

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: gsnedders, Assigned: gsnedders)

Details

Attachments

(1 file)

for the sake of being able to change it upstream without changes in m-c in https://github.com/web-platform-tests/wpt/issues/7598 and if we ever actually implement https://github.com/web-platform-tests/wpt/issues/7135
Assignee: nobody → geoffers+mozilla
Status: NEW → ASSIGNED
https://treeherder.mozilla.org/#/jobs?repo=try&revision=9f1462bf64454bb510c98b4f5642f50369772471 ran this through try (reftest wpt only, given that's all this should affect), and Win7 seems to fail when trying to encode images when converting the canvas to a data URL.

Myself and James' assumption here is that it's hitting OOM, though this is a bit surprising given all it should really be changing is adding one extra layer of indirection (an extra Map) for the screenshots.

Anyone got any advice on how to start figuring this out?
Flags: needinfo?(ato)
We're still failing on Win7, despite now listening for memory-pressure (and not getting any notifications).

See https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=216615156&repo=try&lineNumber=8639:

16:38:13     INFO - PID 5260 | [Parent 4812, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file z:/build/build/src/dom/base/ImageEncoder.cpp, line 407
16:38:13     INFO - PID 5260 | [Parent 4812, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005: file z:/build/build/src/dom/html/HTMLCanvasElement.cpp, line 758
16:38:13     INFO - TEST-UNEXPECTED-ERROR | /css/CSS2/normal-flow/max-width-106.xht | [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://marionette/content/reftest.js :: toBase64 :: line 262"  data: no]

Note these failures are Win7 only.

:njn or :gsvelto, :jgraham suggested you might be able to help with figuring out the cause of these failures?
Flags: needinfo?(n.nethercote)
Flags: needinfo?(gsvelto)
Flags: needinfo?(ato)
To be clear, what I meant is that they might know if we expect to get memory-pressure notifications here if we happen to be going above the per-process limit on win32, and whether the way the observer is wired up is correct. It is still possible that the hypothesis that this error is OOM is entirely false.
The machinery that detects low-memory scenarios polls at a very slow rate (once per second) and only when the user is interacting with Firefox so it's unlikely that you'll get a memory-pressure event in automation. Looking at the log I see the error in ImageEncoder::ExtractDataInternal() but since there's not much info apart from that I'd sprinkle that call with printouts to figure out which one of the called functions is failing and then dig down to the source.
Flags: needinfo?(gsvelto)
I don't have anything to add beyond what gsvelto said.
Flags: needinfo?(n.nethercote)
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/daf05866f9dd
Make width/height of reftests configurable over Marionette r=jgraham,ato

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=success%2Ctestfailed%2Cbusted%2Cexception&tochange=3994da3447c34fbf333b51776fd91afeb7fa1dbf&fromchange=daf05866f9ddcd5a362b4d436477f3e01abd4234&searchStr=mn&selectedJob=221132110

Failure log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=221150086&repo=autoland&lineNumber=60695
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=221137313&repo=autoland&lineNumber=60619

Backout link: https://hg.mozilla.org/integration/autoland/rev/3994da3447c34fbf333b51776fd91afeb7fa1dbf

10:48:35 WARNING - Failed to gather test failure debug: Browsing context has been discarded
10:48:35 WARNING - stacktrace:
10:48:35 WARNING - WebDriverError@chrome://marionette/content/error.js:179:5
10:48:35 WARNING - NoSuchWindowError@chrome://marionette/content/error.js:411:5
10:48:35 WARNING - assert.that/<@chrome://marionette/content/assert.js:418:13
10:48:35 WARNING - assert.open@chrome://marionette/content/assert.js:174:10
10:48:35 WARNING - GeckoDriver.prototype.takeScreenshot@chrome://marionette/content/driver.js:2927:13
10:48:35 WARNING - despatch@chrome://marionette/content/server.js:290:20
10:48:35 WARNING - asyncexecute@chrome://marionette/content/server.js:263:11
10:48:35 WARNING - async
onPacket/<@chrome://marionette/content/server.js:236:15
10:48:35 WARNING - async*onPacket@chrome://marionette/content/server.js:235:8
10:48:35 WARNING - _onJSONObjectReady/<@chrome://marionette/content/transport.js:493:9
10:48:35 WARNING -
10:48:35 INFO - TEST-UNEXPECTED-FAIL | testing/marionette/harness/marionette_harness/tests/unit/test_reftest.py TestReftest.test_cache_multiple_sizes | AssertionError: u'FAIL' != u'TIMEOUT'
10:48:35 INFO - - FAIL
10:48:35 INFO - + TIMEOUT
10:48:35 INFO - Traceback (most recent call last):
10:48:35 INFO - File "/Users/cltbld/tasks/task_1547145020/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 159, in run
10:48:35 INFO - testMethod()
10:48:35 INFO - File "/Users/cltbld/tasks/task_1547145020/build/tests/marionette/tests/testing/marionette/harness/marionette_harness/tests/unit/test_reftest.py", line 83, in test_cache_multiple_sizes
10:48:35 INFO - self.assertEqual(u"FAIL", rv[u"value"][u"status"])
10:48:35 INFO - TEST-INFO took 2522ms
10:48:35 INFO - 1547146115184 Marionette DEBUG 7 -> [0,18,"reftest:teardown",{}]
10:48:35 INFO - 1547146115187 Marionette DEBUG 7 <- [1,18,null,{"value":null}]
10:48:35 INFO - 1547146115192 Marionette DEBUG 7 -> [0,19,"WebDriver:SwitchToWindow",{"focus":true,"name":"2147483649"}]
10:48:35 INFO - 1547146115195 Marionette DEBUG 7 <- [1,19,null,{"value":null}]
10:48:35 INFO - 1547146115199 Marionette DEBUG 7 -> [0,20,"Marionette:SetContext",{"value":"content"}]
10:48:35 INFO - 1547146115201 Marionette DEBUG 7 <- [1,20,null,{"value":null}]
10:48:35 INFO - 1547146115205 Marionette DEBUG 7 -> [0,21,"Marionette:GetContext",{}]
10:48:35 INFO - 1547146115207 Marionette DEBUG 7 <- [1,21,null,{"value":"content"}]
10:48:35 INFO - 1547146115210 Marionette DEBUG 7 -> [0,22,"Marionette:SetContext",{"value":"chrome"}]
10:48:35 INFO - 1547146115212 Marionette DEBUG 7 <- [1,22,null,{"value":null}]
10:48:35 INFO - 1547146115216 Marionette DEBUG 7 -> [0,23,"WebDriver:ExecuteScript",{"script":"Components.utils.import("resource://gre/modules/Preferences.jsm");\n ... ontent"],"filename":"../../venv/lib/python2.7/site-packages/marionette_driver/marionette.py","sandbox":"default","line":870}]
10:48:35 INFO - [Child 2202, Main Thread] WARNING: '!gThread', file /builds/worker/workspace/build/src/xpcom/threads/nsTimerImpl.cpp, line 299
10:48:35 INFO - [Child 2202, Main Thread] WARNING: '!gThread', file /builds/worker/workspace/build/src/xpcom/threads/nsTimerImpl.cpp, line 299
10:48:35 INFO - 1547146115227 Marionette DEBUG 7 <- [1,23,null,{"value":null}]
10:48:35 INFO - 1547146115240 Marionette DEBUG 7 -> [0,24,"Marionette:SetContext",{"value":"content"}]
10:48:35 INFO - 1547146115244 Marionette DEBUG 7 <- [1,24,null,{"value":null}]
10:48:35 INFO - 1547146115261 Marionette DEBUG 7 -> [0,25,"WebDriver:DeleteSession",{}]
10:48:35 INFO - 1547146115268 Marionette DEBUG 7 <- [1,25,null,{"value":null}]

Flags: needinfo?(geoffers+mozilla)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/14821 for changes under testing/web-platform/tests
Flags: needinfo?(geoffers+mozilla)
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/autoland/rev/0a9c477577de
Make width/height of reftests configurable over Marionette r=jgraham,ato
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
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.

Attachment

General

Created:
Updated:
Size: