Closed Bug 1723294 Opened 4 months ago Closed 4 months ago

TEST-UNEXPECTED-ERROR Perma Linux ASAN | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | OSError: Process has been unexpectedly closed (Exit code: 0) when Gecko 92 merges to Beta on 2021-08-09

Categories

(Core :: DOM: Security, defect, P1)

Firefox 92
x86
Linux
defect

Tracking

()

VERIFIED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 + verified

People

(Reporter: dluca, Assigned: tjr)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [domsecurity-active])

Attachments

(1 file)

[Tracking Requested - why for this release]:

Central-as-beta-simulation:
https://treeherder.mozilla.org/jobs?repo=try&revision=ddf5d450f31d9f818689d5fe3e8d497add35bd1d&searchStr=linux%2C18.04%2Cx64%2Cwebrender%2Casan%2Copt%2Ctest-linux1804-64-asan-qr%2Fopt-marionette-e10s%2Cmn

Log:
https://treeherder.mozilla.org/logviewer?job_id=346988430&repo=try&lineNumber=30493

INFO -  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /builds/worker/checkouts/gecko/dom/security/nsContentSecurityUtils.cpp:1095:8 in
[task 2021-07-31T12:39:04.759Z] 12:39:04     INFO -  llvm-symbolizer: Unknown command line argument '--inlines'.  Try: '/usr/bin/llvm-symbolizer -help'
[task 2021-07-31T12:39:04.760Z] 12:39:04     INFO -  llvm-symbolizer: Did you mean '-inlining'?
[task 2021-07-31T12:39:04.810Z] 12:39:04     INFO -  Exiting due to channel error.
[task 2021-07-31T12:39:04.813Z] 12:39:04     INFO -  Exiting due to channel error.
[task 2021-07-31T12:39:04.813Z] 12:39:04     INFO -  Exiting due to channel error.
[task 2021-07-31T12:39:04.813Z] 12:39:04     INFO -  Exiting due to channel error.
[task 2021-07-31T12:39:04.853Z] 12:39:04     INFO - TEST-UNEXPECTED-ERROR | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | OSError: Process has been unexpectedly closed (Exit code: 0) (Reason: No data received over socket)
[task 2021-07-31T12:39:04.853Z] 12:39:04     INFO - Traceback (most recent call last):
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_harness/marionette_test/testcases.py", line 202, in run
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -     testMethod()
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 684, in testResetEverything
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -     self.checkProfile(has_migrated=True, expect_sync_user=True)
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 510, in checkProfile
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -     self.checkSession()
[task 2021-07-31T12:39:04.854Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 461, in checkSession
[task 2021-07-31T12:39:04.855Z] 12:39:04     INFO -     """  # NOQA: E501
[task 2021-07-31T12:39:04.855Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py", line 553, in runAsyncCode
[task 2021-07-31T12:39:04.855Z] 12:39:04     INFO -     script, new_sandbox=False, sandbox=self._sandbox, *args, **kwargs
[task 2021-07-31T12:39:04.856Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/marionette.py", line 1731, in execute_async_script
[task 2021-07-31T12:39:04.856Z] 12:39:04     INFO -     rv = self._send_message("WebDriver:ExecuteAsyncScript", body, key="value")
[task 2021-07-31T12:39:04.857Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/decorators.py", line 37, in _
[task 2021-07-31T12:39:04.857Z] 12:39:04     INFO -     m._handle_socket_failure()
[task 2021-07-31T12:39:04.857Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/marionette.py", line 717, in _handle_socket_failure
[task 2021-07-31T12:39:04.857Z] 12:39:04     INFO -     IOError, IOError(message.format(returncode=returncode, reason=exc)), tb
[task 2021-07-31T12:39:04.858Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/six.py", line 702, in reraise
[task 2021-07-31T12:39:04.858Z] 12:39:04     INFO -     raise value.with_traceback(tb)
[task 2021-07-31T12:39:04.859Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/decorators.py", line 27, in _
[task 2021-07-31T12:39:04.859Z] 12:39:04     INFO -     return func(*args, **kwargs)
[task 2021-07-31T12:39:04.859Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/marionette.py", line 623, in _send_message
[task 2021-07-31T12:39:04.860Z] 12:39:04     INFO -     msg = self.client.request(name, params)
[task 2021-07-31T12:39:04.860Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/transport.py", line 383, in request
[task 2021-07-31T12:39:04.860Z] 12:39:04     INFO -     return self.receive()
[task 2021-07-31T12:39:04.861Z] 12:39:04     INFO -   File "/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/transport.py", line 230, in receive
[task 2021-07-31T12:39:04.861Z] 12:39:04     INFO -     raise socket.error("No data received over socket")
[task 2021-07-31T12:39:04.862Z] 12:39:04     INFO - TEST-INFO took 22667ms
[task 2021-07-31T12:39:04.864Z] 12:39:04    ERROR - test_end for browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything logged while not in progress. Logged with data: {"message": "marionette_driver.errors.InvalidSessionIdException: Please start a session", "expected": "PASS", "stack": "Traceback (most recent call last):\n  File \"/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_harness/marionette_test/testcases.py\", line 235, in run\n    self.tearDown()\n  File \"/builds/worker/workspace/build/tests/marionette/tests/browser/components/migration/tests/marionette/test_refresh_firefox.py\", line 566, in tearDown\n    self.marionette.restart(clean=True, in_app=False)\n  File \"/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/decorators.py\", line 27, in _\n    return func(*args, **kwargs)\n  File \"/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/marionette.py\", line 1054, in restart\n    context = self._send_message(\"Marionette:GetContext\", key=\"value\")\n  File \"/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/decorators.py\", line 27, in _\n    return func(*args, **kwargs)\n  File \"/builds/worker/workspace/build/venv/lib/python3.6/site-packages/marionette_driver/marionette.py\", line 620, in _send_message\n    raise errors.InvalidSessionIdException(\"Please start a session\")\n", "extra": {"class_name": "test_refresh_firefox.TestFirefoxRefresh", "method_name": "testResetEverything"}, "test": "browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything", "status": "ERROR"}
[task 2021-07-31T12:39:04.866Z] 12:39:04     INFO - TEST-START | js/xpconnect/tests/marionette/test_preloader_telemetry.py TestScriptPreloader.test_preloader_requests_histogram
OS: Unspecified → Linux
Hardware: Unspecified → x86

This is a Linux ASAN only issue. It actually appears that Firefox shuts down after Marionette started to listen, which may be caused by the nsContentSecurityUtils.cpp code.

https://treeherder.mozilla.org/logviewer?job_id=346994544&repo=try&lineNumber=62877-62881

14:07:13     INFO -  1627740433592  Marionette  INFO    Listening on port 2828
14:07:14     INFO -  /builds/worker/checkouts/gecko/dom/security/nsContentSecurityUtils.cpp:1095:8: runtime error: load of value 16, which is not a valid value for type 'bool'
14:07:14     INFO -  llvm-symbolizer: Unknown command line argument '--inlines'.  Try: '/usr/bin/llvm-symbolizer -help'
14:07:14     INFO -  llvm-symbolizer: Did you mean '-inlining'?
14:07:14     INFO -  ==18005==WARNING: Can't read from symbolizer at fd 90

This seems to be from:
https://searchfox.org/mozilla-central/rev/4b88e0b8cca115009e82fdd65e5bf5812ff99128/dom/security/nsContentSecurityUtils.cpp#1095

So probably a regression from bug 1722775? Tom, could you please have a look?

Flags: needinfo?(tom)
Summary: TEST-UNEXPECTED-ERROR Perma | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | OSError: Process has been unexpectedly closed (Exit code: 0) when Gecko 92 merges to Beta on 2021-08-09 → TEST-UNEXPECTED-ERROR Perma Linux ASAN | browser/components/migration/tests/marionette/test_refresh_firefox.py TestFirefoxRefresh.testResetEverything | OSError: Process has been unexpectedly closed (Exit code: 0) when Gecko 92 merges to Beta on 2021-08-09
Assignee: nobody → tom
Status: NEW → ASSIGNED

I see that this is as a result of a central-on-beta simulation which makes me think that the issue is caused by not using a GetBool call that supplies a default value for a pref that is not defined in Beta.

Component: Marionette → DOM: Security
Product: Testing → Core
Keywords: regression
Regressed by: 1722775
Pushed by tritter@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2e3d1484168
Supply a default value to a nightly-only pref lookup r=ckerschb
Severity: -- → S2
Priority: -- → P1
Whiteboard: [domsecurity-active]
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Status: RESOLVED → VERIFIED
Flags: needinfo?(tom)
You need to log in before you can comment on or make changes to this bug.