Closed Bug 1361302 Opened 3 years ago Closed 3 years ago

Intermittent test_click.py TestClickNavigation.test_click_remoteness_change (double navigation) | IOError: Process killed because the connection to Marionette server is lost. Check gecko.log for errors (Reason: Connection timed out after 360.0s)

Categories

(Testing :: Marionette, defect)

Version 3
defect
Not set

Tracking

(firefox54 fixed, firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: whimboo)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Filed by: hskupin [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=95696166&repo=autoland

https://archive.mozilla.org/pub/firefox/tinderbox-builds/autoland-win64-debug/1493659700/autoland_win8_64-debug_test-marionette-e10s-bm127-tests1-windows-build474.txt.gz

So the reason here is an early return from click() because there is an unexpected hash change of the URL, which happens before the `pagehide` event is getting raises, and which indicates a full page load to the previous page in the cache: 

1493662706798	Marionette	TRACE	433 -> [0,19,"findElement",{"using":"id","value":"history-back"}]
1493662706808	Marionette	TRACE	433 <- [1,19,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"4ecfd565-3c29-4673-a6a5-0ace3f05b311","ELEMENT":"4ecfd565-3c29-4673-a6a5-0ace3f05b311"}}]
1493662706810	Marionette	TRACE	433 -> [0,20,"clickElement",{"id":"4ecfd565-3c29-4673-a6a5-0ace3f05b311"}]
1493662707111	Marionette	DEBUG	Received DOM event "hashchange" for "http://127.0.0.1:49326/clicks.html#"
1493662707131	Marionette	TRACE	433 <- [1,20,null,{}]
1493662707159	Marionette	TRACE	433 -> [0,21,"findElement",{"using":"id","value":"anchor"}]

Given that we have a double navigation here, I'm not that sure if we should actually cover that by default. I will have a look at this today and do some timing tests, to see how this could be improved.
Summary: Intermittent test_click.py TestClickNavigation.test_click_remoteness_change | IOError: Process killed because the connection to Marionette server is lost. Check gecko.log for errors (Reason: Connection timed out after 360.0s) → Intermittent test_click.py TestClickNavigation.test_click_remoteness_change (double navigation) | IOError: Process killed because the connection to Marionette server is lost. Check gecko.log for errors (Reason: Connection timed out after 360.0s)
So this failure can actually happen for very slow machines under the following condition:

1) Clicking a link will cause a hashchange event to fire (eg. Javascript links)
2) A remoteness change will happen (nowadays only for about: pages, except about:blank)

It's very unlikely that such a condition will happen in the wild. I will have to find a way to simply stop the `hashchange` event in our unit test.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Actually in clicks.html we have the following source:

> <a href="#" onclick="history.back();" id="history-back">Back in browser history</a>

It means the href value of '#' is actually adding the hash, before the real navigation starts. So we have a double navigation here due to the `onclick` listener. 

I don't think that we can support such a double-navigation right now, and I would suggest to simply drop that for now by removing the `#` from the href.
Comment on attachment 8863758 [details]
Bug 1361302 - Fix clicks.html to not trigger a double navigation for history navigation.

https://reviewboard.mozilla.org/r/135534/#review138646
Attachment #8863758 - Flags: review+
Attachment #8863758 - Flags: review?(ato)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3d518ac621a
Fix clicks.html to not trigger a double navigation for history navigation. r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/f3d518ac621a
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.