Closed Bug 1462040 Opened 3 years ago Closed 3 years ago

Force geckodriver to always use IPv4 to connect to Marionette

Categories

(Testing :: geckodriver, enhancement, P1)

Version 3
enhancement

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Lately we get a couple of reports that geckodriver is not able to connect to Marionette even with the Marionette server running. As I found out with one Selenium tester in #selenium the underlying problem is IPv6 and that geckodriver tries to use that but fails because Marionette only works with IPv4.

There are a couple of TCP Retransmissions entries in the Wireshark log, all for IPv6. Each one after a longer time interval. Finally after ~2 minutes geckodriver tries to use IPv4. What's interesting is that we have a timeout of 60s defined for the connection attempt! So why does it even try that long?

> 6	0.007	::1	::1	TCP	94	41062 → 2828 [SYN] Seq=1589926227 Win=43690 Len=0 MSS=65476 SACK_PERM=1 TSval=518483 TSecr=0 WS=128
> 7	1.016	::1	::1	TCP	94	[TCP Retransmission] 41062 → 2828 [SYN] Seq=1589926227 Win=43690 Len=0 MSS=65476 SACK_PERM=1 TSval=518736 TSecr=0 WS=128
[..]
> 16	121.528	127.0.0.1	127.0.0.1	TCP	66	[TCP Keep-Alive ACK] 4444 → 44732 [ACK] Seq=3493068045 Ack=3571267333 Win=44800 Len=0 TSval=548864 TSecr=518481
> 17	129.720	127.0.0.1	127.0.0.1	TCP	74	44122 → 2828 [SYN] Seq=252184157 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=550912 TSecr=0 WS=128
> 18	129.720	127.0.0.1	127.0.0.1	TCP	74	2828 → 44122 [SYN, ACK] Seq=4247255711 Ack=252184158 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=550912 TSecr=550912 WS=128
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: -- → P1
noteventime was the one who notified me about this problem. So would you be so kind and test the patches geckodriver binary? It can be found as part of the try build I just pushed:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d2a212d6928da0c242f684d6dbfa73bca8d263a&selectedJob=178829729

Download the target.common.tests.zip artifact from the job details, unzip that file, and test with bin/geckodriver.

Thanks.
Flags: needinfo?(mozilla)
(In reply to Henrik Skupin (:whimboo) from comment #2)
> noteventime was the one who notified me about this problem. So would you be
> so kind and test the patches geckodriver binary? It can be found as part of
> the try build I just pushed:
> 
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=5d2a212d6928da0c242f684d6dbfa73bca8d263a&selectedJob=1
> 78829729
> 
> Download the target.common.tests.zip artifact from the job details, unzip
> that file, and test with bin/geckodriver.
> 
> Thanks.

Cheers! This appears to solve the problem, geckodriver now responds in a reasonable amount of time (with and without IPv6 enabled).
Flags: needinfo?(mozilla)
Attachment #8976281 - Flags: review?(ato)
Attachment #8976281 - Flags: review?(james)
Comment on attachment 8976281 [details]
Bug 1462040 - Force geckodriver to always use IPv4 to connect to Marionette.

https://reviewboard.mozilla.org/r/244460/#review250670
Attachment #8976281 - Flags: review?(james) → review+
Attachment #8976281 - Flags: review?(ato)
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ec11d8e362f0
Force geckodriver to always use IPv4 to connect to Marionette. r=jgraham
https://hg.mozilla.org/mozilla-central/rev/ec11d8e362f0
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.