m-lab / ndt-e2e-clientworker

Code for the client worker of the NDT end-to-end test framework
Apache License 2.0
1 stars 4 forks source link

Crash on Win10+FF+banjo: existing connection was forcibly closed #76

Open mtlynch opened 8 years ago

mtlynch commented 8 years ago

Saw this crash when running the banjo test on Win10 + Firefox:

2016-06-07 13:29:30,421 __main__     INFO     starting iteration 1...
2016-06-07 13:29:30,421 banjo_driver INFO     starting banjo test
2016-06-07 13:29:35,193 banjo_driver INFO     loading URL: http://localhost:54671/banjo
2016-06-07 13:31:00,776 banjo_driver INFO     page loaded, starting UI flow
2016-06-07 13:31:00,990 banjo_driver INFO     clicked "Run Test" button
2016-06-07 13:31:04,924 banjo_driver INFO     s2c test started
starting iteration 1...
Traceback (most recent call last):
  File "C:\ndt-e2e-clientworker\client_wrapper/client_wrapper.py", line 139, in <module>
    main(parser.parse_args())
  File "C:\ndt-e2e-clientworker\client_wrapper/client_wrapper.py", line 45, in main
    _run_test_iterations(driver, args.iterations, args.output)
  File "C:\ndt-e2e-clientworker\client_wrapper/client_wrapper.py", line 84, in _run_test_iterations
    result = driver.perform_test()
  File "C:\ndt-e2e-clientworker\client_wrapper\banjo_driver.py", line 80, in perform_test
    result).complete_ui_flow()
  File "C:\ndt-e2e-clientworker\client_wrapper\banjo_driver.py", line 106, in complete_ui_flow
    self._record_event_times()
  File "C:\ndt-e2e-clientworker\client_wrapper\banjo_driver.py", line 116, in _record_event_times
    if self._wait_for_download_test_to_end():
  File "C:\ndt-e2e-clientworker\client_wrapper\banjo_driver.py", line 165, in _wait_for_download_test_to_end
    'Waiting for upload to start...')
  File "C:\ndt-e2e-clientworker\client_wrapper\banjo_driver.py", line 184, in _wait_for_status_banner_text
    'lrfactory-internetspeed__status-indicator'), status_text))
  File "C:\Python27\lib\site-packages\selenium\webdriver\support\wait.py", line 71, in until
    value = method(self._driver)
  File "C:\Python27\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 116, in __call__
    element_text = _find_element(driver, self.locator).text
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 70, in text
    return self._execute(Command.GET_ELEMENT_TEXT)['value']
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 457, in _execute
    return self._parent.execute(command, params)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 231, in execute
    response = self.command_executor.execute(driver_command, params)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 395, in execute
    return self._request(command_info[0], url, body=data)
  File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 471, in _request
    data = resp.read()
  File "C:\Python27\lib\httplib.py", line 596, in read
    s = self._safe_read(self.length)
  File "C:\Python27\lib\httplib.py", line 703, in _safe_read
    chunk = self.fp.read(min(amt, MAXAMOUNT))
  File "C:\Python27\lib\socket.py", line 384, in read
    data = self._sock.recv(left)
socket.error: [Errno 10054] An existing connection was forcibly closed by the remote host

Not sure what's going on here. I'm assuming it's referring to the connection between selenium<->firefox, but I don't know what would cause the browser to forcibly close that connection.

mtlynch commented 8 years ago

Just caught a similar crash on Ubuntu + Chrome + Banjo

Traceback (most recent call last):
  File "/opt/ndt-e2e-clientworker/client_wrapper/client_wrapper.py", line 139, in <module>
    main(parser.parse_args())
  File "/opt/ndt-e2e-clientworker/client_wrapper/client_wrapper.py", line 45, in main
    _run_test_iterations(driver, args.iterations, args.output)
  File "/opt/ndt-e2e-clientworker/client_wrapper/client_wrapper.py", line 84, in _run_test_iterations
    result = driver.perform_test()
  File "/opt/ndt-e2e-clientworker/client_wrapper/banjo_driver.py", line 80, in perform_test
    result).complete_ui_flow()
  File "/opt/ndt-e2e-clientworker/client_wrapper/banjo_driver.py", line 106, in complete_ui_flow
    self._record_event_times()
  File "/opt/ndt-e2e-clientworker/client_wrapper/banjo_driver.py", line 130, in _record_event_times
    if self._wait_for_latency_field():
  File "/opt/ndt-e2e-clientworker/client_wrapper/banjo_driver.py", line 193, in _wait_for_latency_field
    _DEFAULT_TIMEOUT)
  File "/opt/ndt-e2e-clientworker/client_wrapper/browser_client_common.py", line 131, in wait_until_element_is_visible
    driver, timeout).until(expected_conditions.visibility_of(element))
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/wait.py", line 71, in until
    value = method(self._driver)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/expected_conditions.py", line 88, in __call__
    return _element_if_visible(self.element)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/support/expected_conditions.py", line 91, in _element_if_visible
    return element if element.is_displayed() == visibility else False
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 327, in is_displayed
    return self._execute(Command.IS_ELEMENT_DISPLAYED)['value']
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 457, in _execute
    return self._parent.execute(command, params)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 231, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 395, in execute
    return self._request(command_info[0], url, body=data)
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 425, in _request
    self._conn.request(method, parsed_url.path, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 778, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
socket.error: [Errno 111] Connection refused