Closed Bug 1293093 Opened 3 years ago Closed 3 years ago
Fix error reporting for connection refused
58 bytes, text/x-review-board-request
https://treeherder.mozilla.org/logviewer.html#?job_id=1527264&repo=autoland 02:48:51 INFO - Traceback (most recent call last): 02:48:51 INFO - File "C:\slave\test\build\tests\mochitest\runtests.py", line 2422, in doTests 02:48:51 INFO - marionette_args=marionette_args, 02:48:51 INFO - File "C:\slave\test\build\tests\mochitest\runtests.py", line 2037, in runApp 02:48:51 INFO - self.marionette.start_session(timeout=port_timeout) 02:48:51 INFO - File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1126, in start_session 02:48:51 INFO - self.protocol, _ = self.client.connect() 02:48:51 INFO - File "C:\slave\test\build\venv\lib\site-packages\marionette_driver\transport.py", line 213, in connect 02:48:51 INFO - self.sock.connect((self.addr, self.port)) 02:48:51 INFO - File "c:\mozilla-build\python27\Lib\socket.py", line 224, in meth 02:48:53 INFO - return getattr(self._sock,name)(*args) 02:48:53 INFO - error: [Errno 10061] No connection could be made because the target machine actively refused it 02:48:53 INFO - 132 ERROR Automation Error: Received unexpected exception while running application Not only is "ERROR Automation Error: Received unexpected exception while running application" a terribly vague error message for "No connection could be made because the target machine actively refused it", but it's a completely unusable one because of that leading random number: bug 1261598 has only gotten starred three times ever not because this has only happened three times, but because someone has gone to the trouble of manually dealing with it by searching for the error message without the leading number only twice after it was filed.
Ahal, Thoughts on what this could be?
Ah, I actually should have filed two bugs, one against Mochitest, "Get rid of the number at the start of ERROR Automation Error: Received unexpected exception" and one against Marionette, "marionette_driver needs to catch connection failures and report them with a treeherder-parseable error message".
We are hitting this exception here in line 213: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette_driver/transport.py#212 Reason is that we re-throw the exception here and do not have the `@do_process_check` decorator for `start_session()`. It's an easy one to get fixed, so I will take it.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
With my upcoming patch the failure message will be aligned to other socket failures: IOError: Process killed because the connection to Marionette server is lost. Check gecko.log for errors (Reason: [Errno 111] Connection refused)
Once landed we can also backport to branch 50, where do_process_check also exists.
Comment on attachment 8778794 [details] Bug 1293093 - Fix failure message for socket errors in start_session. https://reviewboard.mozilla.org/r/69962/#review67132
Attachment #8778794 - Flags: review?(dburns) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/1fa92a8698a9 Fix failure message for socket errors in start_session. r=automatedtester
You need to log in before you can comment on or make changes to this bug.