Bug: Intermittent components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | IOError: Process has been unexpectedly closed (Exit code: -27) (Reason: Process unexpectedly quit without restarting (exit code: -27))
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2020-09-29 00:08:15+00:00
Resolved: 2020-10-27 17:04:15+00:00

**Filed by:** btara [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer.html#?job_id=316956555&repo=mozilla-central
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/J5t7tN9-TSe1wqPNfPKzXA/runs/0/artifacts/public/logs/live_backing.log

---
```
```
...
[task 2020-09-28T23:24:19.370Z] 23:24:19     INFO -  DEBUG: Completed blocker Closing ContentPrefService2 connection. for phase Sqlite.jsm: wait until all clients have completed their task
[task 2020-09-28T23:24:19.371Z] 23:24:19     INFO -  DEBUG: Completed blocker formhistory.sqlite#0: waiting for shutdown for phase Sqlite.jsm: wait until all connections are closed
[task 2020-09-28T23:24:19.371Z] 23:24:19     INFO -  DEBUG: Completed blocker Closing FormHistory database. for phase Sqlite.jsm: wait until all clients have completed their task
[task 2020-09-28T23:24:19.371Z] 23:24:19     INFO -  DEBUG: Completed blocker Sqlite.jsm shutdown blocker for phase profile-before-change
[task 2020-09-28T23:24:19.371Z] 23:24:19     INFO -  DEBUG: Completed blocker Search service: shutting down for phase OS.File: Waiting for clients before profileBeforeChange
[task 2020-09-28T23:24:19.371Z] 23:24:19     INFO -  DEBUG: Completed blocker Flush WebExtension StartupCache for phase profile-before-change
[task 2020-09-28T23:24:19.373Z] 23:24:19     INFO -  DEBUG: Completed blocker ContextualIdentityService: writing data for phase profile-before-change
[task 2020-09-28T23:24:19.373Z] 23:24:19     INFO -  DEBUG: Completed blocker JSON store: writing data for phase profile-before-change
[task 2020-09-28T23:24:19.373Z] 23:24:19     INFO -  DEBUG: Completed blocker JSON store: writing data for phase profile-before-change
[task 2020-09-28T23:24:19.373Z] 23:24:19     INFO -  DEBUG: Completed blocker JSON store: writing data for phase profile-before-change
[task 2020-09-28T23:24:19.380Z] 23:24:19     INFO -  DEBUG: Completed blocker JSON store: writing data for phase AddonManager: Waiting for providers to shut down.
[task 2020-09-28T23:24:19.380Z] 23:24:19     INFO -  DEBUG: Completed blocker AddonManager: shutting down. for phase profile-before-change
[task 2020-09-28T23:24:19.381Z] 23:24:19     INFO -  DEBUG: Completed blocker OS.File: flush I/O queued before profileBeforeChange for phase profile-before-change
[task 2020-09-28T23:24:19.381Z] 23:24:19     INFO -  DEBUG: Completed blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.398Z] 23:24:19     INFO -  DEBUG: Finished phase profile-before-change
[task 2020-09-28T23:24:19.414Z] 23:24:19     INFO -  DEBUG: Starting phase profile-before-change-telemetry
[task 2020-09-28T23:24:19.414Z] 23:24:19     INFO -  DEBUG: Spinning the event loop
[task 2020-09-28T23:24:19.493Z] 23:24:19     INFO -  DEBUG: Adding blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.493Z] 23:24:19     INFO -  DEBUG: Completed blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.500Z] 23:24:19     INFO -  DEBUG: Adding blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.521Z] 23:24:19     INFO -  DEBUG: Adding blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.536Z] 23:24:19     INFO -  DEBUG: Adding blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.536Z] 23:24:19     INFO -  DEBUG: Completed blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.540Z] 23:24:19     INFO -  DEBUG: Completed blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.540Z] 23:24:19     INFO -  DEBUG: Completed blocker Waiting for ping task for phase TelemetryController: Waiting for pending ping activity
[task 2020-09-28T23:24:19.548Z] 23:24:19     INFO -  DEBUG: Completed blocker TelemetryController: shutting down for phase profile-before-change-telemetry
[task 2020-09-28T23:24:19.548Z] 23:24:19     INFO -  DEBUG: Finished phase profile-before-change-telemetry
[task 2020-09-28T23:24:19.552Z] 23:24:19     INFO -  1601335459548	Marionette	TRACE	Received observer notification xpcom-will-shutdown
[task 2020-09-28T23:24:19.552Z] 23:24:19     INFO -  1601335459548	Marionette	DEBUG	Marionette stopped listening
[task 2020-09-28T23:24:19.552Z] 23:24:19     INFO -  DEBUG: Starting phase xpcom-will-shutdown
[task 2020-09-28T23:24:19.552Z] 23:24:19     INFO -  DEBUG: Spinning the event loop
[task 2020-09-28T23:24:19.587Z] 23:24:19     INFO -  DEBUG: Completed blocker OS.File: flush pending requests, warn about unclosed files, shut down service. for phase xpcom-will-shutdown
[task 2020-09-28T23:24:19.595Z] 23:24:19     INFO -  DEBUG: Finished phase xpcom-will-shutdown
[task 2020-09-28T23:25:29.387Z] 23:25:29     INFO - TEST-UNEXPECTED-ERROR | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | IOError: Process has been unexpectedly closed (Exit code: -27) (Reason: Process unexpectedly quit without restarting (exit code: -27))
[task 2020-09-28T23:25:29.387Z] 23:25:29     INFO - Traceback (most recent call last):
[task 2020-09-28T23:25:29.387Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py", line 196, in run
[task 2020-09-28T23:25:29.388Z] 23:25:29     INFO -     testMethod()
[task 2020-09-28T23:25:29.388Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 592, in testResetEverything
[task 2020-09-28T23:25:29.389Z] 23:25:29     INFO -     this_cleanup = self.doReset()
[task 2020-09-28T23:25:29.389Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 555, in doReset
[task 2020-09-28T23:25:29.390Z] 23:25:29     INFO -     self.marionette.restart(clean=False, in_app=True)
[task 2020-09-28T23:25:29.390Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 36, in _
[task 2020-09-28T23:25:29.390Z] 23:25:29     INFO -     m._handle_socket_failure()
[task 2020-09-28T23:25:29.391Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 682, in _handle_socket_failure
[task 2020-09-28T23:25:29.392Z] 23:25:29     INFO -     reraise(IOError, IOError(message.format(returncode=returncode, reason=exc)), tb)
[task 2020-09-28T23:25:29.392Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
[task 2020-09-28T23:25:29.393Z] 23:25:29     INFO -     return func(*args, **kwargs)
[task 2020-09-28T23:25:29.393Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1046, in restart
[task 2020-09-28T23:25:29.394Z] 23:25:29     INFO -     reraise(exc_cls, exc_cls(msg.format(self.instance.runner.returncode)), tb)
[task 2020-09-28T23:25:29.394Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1029, in restart
[task 2020-09-28T23:25:29.395Z] 23:25:29     INFO -     check_process_status=False)
[task 2020-09-28T23:25:29.395Z] 23:25:29     INFO -   File "/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 573, in raise_for_port
[task 2020-09-28T23:25:29.395Z] 23:25:29     INFO -     self.host, self.port))
[task 2020-09-28T23:25:29.396Z] 23:25:29     INFO - TEST-INFO took 70621ms
[task 2020-09-28T23:25:29.396Z] 23:25:29    ERROR - test_end for browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything logged while not in progress. Logged with data: {"status": "ERROR", "extra": {"class_name": "test_refresh_firefox.TestFirefoxRefresh", "method_name": "testResetEverything"}, "expected": "PASS", "test": "browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything", "message": "InvalidSessionIdException: Please start a session", "stack": "Traceback (most recent call last):\n  File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_harness/marionette_test/testcases.py\", line 227, in run\n    self.tearDown()\n  File \"/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py\", line 499, in tearDown\n    self.marionette.restart(clean=True, in_app=False)\n  File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py\", line 26, in _\n    return func(*args, **kwargs)\n  File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py\", line 998, in restart\n    key=\"value\")\n  File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py\", line 26, in _\n    return func(*args, **kwargs)\n  File \"/builds/worker/workspace/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py\", line 591, in _send_message\n    raise errors.InvalidSessionIdException(\"Please start a session\")\n"}
``````