Skip to content

Enable debug assertions for all builds other than official releases#30509

Merged
delan merged 29 commits intoservo:masterfrom
delan:try-with-debug-assertions
Oct 26, 2023
Merged

Enable debug assertions for all builds other than official releases#30509
delan merged 29 commits intoservo:masterfrom
delan:try-with-debug-assertions

Conversation

@delan
Copy link
Member

@delan delan commented Oct 6, 2023

Servo should ideally never panic (see the discussion in #30458), but we still need a way to detect invalid states when hacking on Servo or testing on CI. Unfortunately our release profile has debug assertions disabled.

This patch enables debug assertions in the release profile, while adding a “production” profile that yields a release build without debug assertions, which we use when building nightly releases. This patch also:

  • updates HACKING_QUICKSTART to document our profiles
  • extends mach to accept a --profile argument like Cargo
  • eliminates the std_test_override hack
  • hardens Fix running servoshell and unit tests through a symlink #30537 such that we only try the current directory and its ancestors when we aren’t in the production profile

@delan
Copy link
Member Author

delan commented Oct 6, 2023

@bors-servo try

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

🔨 Triggering try run (#6430688359) with platform=all and layout=all

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test results for linux-wpt-layout-2013 from try job (#6430688359):

Flaky unexpected result (13)
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected PASS] /css/css-fonts/font-size-adjust-reload.html
  • OK /css/cssom-view/MediaQueryList-addListener-handleEvent.html (#24571)
    • FAIL [expected PASS] subtest: calls handleEvent method of event listener assert_equals: expected (object) object "[object Object]" but got (undefined) undefined
  • OK /css/cssom-view/MediaQueryListEvent.html (#25275)
    • FAIL [expected PASS] subtest: argument of onchange assert_true: expected true got false
  • OK /css/cssom-view/offsetTopLeft-border-box.html (#24237)
    • FAIL [expected PASS] subtest: container: 0 assert_equals: offsetTop expected 2 but got 0
    • FAIL [expected PASS] subtest: container: 1 assert_equals: offsetTop expected 2 but got 0
  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • FAIL [expected PASS] subtest: Multiple history traversals, last would be aborted assert_array_equals: Pages opened during history navigation expected property 1 to be 5 but got 3 (expected array [6, 5] got [6, 3])
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html (#22154)
    • NOTRUN [expected FAIL] subtest: Check that popups from a sandboxed iframe do not escape the sandbox
  • OK /html/semantics/forms/form-submission-0/urlencoded2.window.html (#28687)
    • PASS [expected FAIL] subtest: application/x-www-form-urlencoded: Basic test (formdata event)
  • OK /html/syntax/parsing/DOMContentLoaded-defer.html (#21550)
    • PASS [expected FAIL] subtest: The end: DOMContentLoaded and defer scripts
  • TIMEOUT /html/webappapis/scripting/events/compile-event-handler-settings-objects.html (#24246)
    • FAIL [expected PASS] subtest: The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document assert_equals: expected "/html/webappapis/scripting/events/resources/open-window.html" but got "blank"
  • OK [expected TIMEOUT] /webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html (#29053)
    • PASS [expected TIMEOUT] subtest: StorageKey: test 3P about:blank window opened from a 3P iframe
  • ERROR [expected OK] /workers/constructors/Worker/Worker-constructor.html (#22991)
Stable unexpected results that are known to be intermittent (16)
  • OK /css/css-fonts/variations/font-weight-matching.html (#20686)
    • FAIL [expected PASS] subtest: Test @font-face matching for weight 100 assert_approx_equals: @font-face should be mapped to CSSTest Weights 900. expected 90 +/- 2 but got 180
  • OK /css/cssom-view/elementFromPoint-list-001.html (#23915)
    • PASS [expected FAIL] subtest: <li>Outside 1</li>
  • OK /css/cssom-view/scroll-behavior-smooth-navigation.html (#29564)
    • FAIL [expected PASS] subtest: Smooth scrolling while doing history navigation. assert_not_equals: Shouldn't be scrolled to top anymore. got disallowed value 0
  • TIMEOUT /fetch/metadata/generated/css-images.sub.tentative.html (#29047)
    • PASS [expected TIMEOUT] subtest: background-image sec-fetch-dest - Not sent to non-trustworthy same-site destination
    • PASS [expected TIMEOUT] subtest: background-image sec-fetch-site - HTTPS downgrade (header not sent)
    • PASS [expected FAIL] subtest: border-image sec-fetch-site - HTTPS downgrade (header not sent)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • FAIL [expected PASS] subtest: 0080 00FF 0100 set in href="" targeting a frame and clicked assert_equals: expected "�ÿĀ" but got ""
    • FAIL [expected PASS] subtest: D83D DE0D set in href="" targeting a frame and clicked assert_equals: expected "😍" but got ""
    • FAIL [expected PASS] subtest: DE0D 0041 set in href="" targeting a frame and clicked assert_equals: expected "\ufffdA" but got ""
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • PASS [expected FAIL] subtest: Cross-origin navigation started from unload handler must be ignored
  • OK /html/browsers/history/the-location-interface/location-protocol-setter.html (#20839)
    • PASS [expected FAIL] subtest: Equivalent tests for data URL and srcdoc <iframe>s
  • OK /html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html (#29046)
  • OK [expected CRASH] /html/canvas/offscreen/the-offscreen-canvas/size.attributes.parse.minus.worker.html (#30164)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
  • OK /html/webappapis/dynamic-markup-insertion/document-write/module-static-import-delayed.html (#26243)
    • PASS [expected FAIL] subtest: document.write in an imported module
  • PASS [expected CRASH] /streams/readable-streams/crashtests/strategy-worker-terminate.html (#30124)
  • TIMEOUT [expected OK] /webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html (#27664)
  • OK [expected TIMEOUT] /webmessaging/with-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:
  • OK [expected TIMEOUT] /webmessaging/without-ports/018.html (#24485)
    • PASS [expected TIMEOUT] subtest: origin of the script that invoked the method, javascript:

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Test results for linux-wpt-layout-2020 from try job (#6430688359):

Flaky unexpected result (16)
  • TIMEOUT /FileAPI/url/url-in-tags-revoke.window.html (#19978)
    • TIMEOUT [expected FAIL] subtest: Opening a blob URL in a new window immediately before revoking it works. Test timed out
  • OK /_mozilla/mozilla/task_queue_throttling.any.html (#22519)
    • FAIL [expected PASS] subtest: Throttling the performance timeline task queue. assert_true: expected true got false
  • TIMEOUT [expected OK] /_webgl/conformance/glsl/misc/shader-uniform-packing-restrictions.html (#28103)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT /_webgl/conformance/reading/read-pixels-test.html (#28337)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/rendering/rendering-stencil-large-viewport.html (#28343)
    • NOTRUN [expected PASS] subtest: Overall test
  • TIMEOUT [expected OK] /_webgl/conformance/uniforms/out-of-bounds-uniform-array-access.html (#26225)
    • NOTRUN [expected PASS] subtest: Overall test
  • OK /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html (#28066)
    • FAIL [expected PASS] subtest: D83D DE0D set in href="" targeting a frame and clicked assert_equals: expected "😍" but got ""
  • OK /html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-cross-origin.sub.window.html (#29056)
    • FAIL [expected PASS] subtest: Cross-origin navigation started from unload handler must be ignored promise_test: Unhandled rejection with value: object "SecurityError: The operation is insecure."
  • OK /html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html (#28697)
  • OK /html/browsers/browsing-the-web/read-media/pageload-image-in-popup.html (#23849)
    • PASS [expected FAIL] subtest: The document for a standalone media file should have one child in the body.
  • OK /html/browsers/history/the-history-interface/traverse_the_history_2.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • OK /html/browsers/history/the-history-interface/traverse_the_history_5.html (#21383)
    • PASS [expected FAIL] subtest: Multiple history traversals, last would be aborted
  • TIMEOUT [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html (#24057)
    • TIMEOUT [expected FAIL] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used Test timed out
  • OK /html/semantics/embedded-content/the-img-element/non-active-document.html (#21544)
    • PASS [expected FAIL] subtest: createHTMLDocument
    • PASS [expected FAIL] subtest: <template>
  • OK [expected TIMEOUT] /html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html (#29724)
    • PASS [expected TIMEOUT] subtest: reparent-form-during-planned-navigation-task
  • TIMEOUT [expected OK] /webmessaging/with-ports/018.html (#24485)
    • TIMEOUT [expected PASS] subtest: origin of the script that invoked the method, javascript: Test timed out
Stable unexpected results that are known to be intermittent (17)
  • OK /css/CSS2/linebox/inline-negative-margin-001.html (#23862)
    • PASS [expected FAIL] subtest: [data-expected-height] 2
  • OK /css/css-fonts/variations/at-font-face-font-matching.html (#20684)
    • FAIL [expected PASS] subtest: Matching font-weight: '430' should prefer '400 425' over '350 399' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-weight: '430' should prefer '501 550' over '502 560'
    • FAIL [expected PASS] subtest: Matching font-weight: '500' should prefer '500' over '450 460' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-weight: '501' should prefer '501' over '502 510' assert_equals: Unexpected font on test element expected 487 but got 532
    • FAIL [expected PASS] subtest: Matching font-weight: '501' should prefer '450 460' over '390 410' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-style: 'normal' should prefer 'normal' over 'oblique 0deg'
    • FAIL [expected PASS] subtest: Matching font-style: 'normal' should prefer 'oblique -50deg -20deg' over 'oblique -40deg -30deg' assert_equals: Unexpected font on test element expected 487 but got 532
    • PASS [expected FAIL] subtest: Matching font-style: 'italic' should prefer 'oblique 5deg' over 'normal'
    • PASS [expected FAIL] subtest: Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'
    • PASS [expected FAIL] subtest: Matching font-style: 'oblique 20deg' should prefer 'oblique 10deg' over 'italic'
    • And 12 more unexpected results...
  • OK /css/css-text/white-space/trailing-space-position-001.html (#24585)
    • PASS [expected FAIL] subtest: CSS Test: Positions of trailing collapsible spaces 1
    • PASS [expected FAIL] subtest: CSS Test: Positions of trailing collapsible spaces 3
  • OK /css/cssom-view/MediaQueryList-addListener-removeListener.html (#24569)
    • FAIL [expected PASS] subtest: listeners are called correct number of times assert_equals: expected 5 but got 4
  • OK [expected TIMEOUT] /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html (#29048)
  • OK /html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-iframe-contentWindow.html (#28681)
    • PASS [expected FAIL] subtest: load & pageshow events do not fire on contentWindow of <iframe> element created with src=''
  • TIMEOUT [expected OK] /html/browsers/browsing-the-web/navigating-across-documents/javascript-url-load-as-html.xhtml (#29070)
    • TIMEOUT [expected PASS] subtest: javascript: URL navigation to a string must create a HTML document using the correct properties Test timed out
  • OK /html/browsers/history/the-location-interface/location-protocol-setter.html (#20839)
    • PASS [expected FAIL] subtest: Equivalent tests for data URL and srcdoc <iframe>s
  • OK [expected TIMEOUT] /html/browsers/origin/cross-origin-objects/cross-origin-objects.html (#28569)
  • OK /html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html (#29046)
  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/document-with-fragment-top.html (#28259)
    • FAIL [expected TIMEOUT] subtest: Autofocus elements in top-level browsing context's documents with "top" fragments should work. assert_not_equals: got disallowed value Element node <body>
      <div id="anchor1"></div>
      <input autofocus="">

      </b...

  • OK [expected TIMEOUT] /html/interaction/focus/the-autofocus-attribute/supported-elements.html (#24145)
    • FAIL [expected TIMEOUT] subtest: Area element should support autofocus promise_test: Unhandled rejection with value: object "TypeError: w.document.querySelector(...) is null"
  • CRASH [expected OK] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html (#22647)
  • OK [expected TIMEOUT] /html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html (#22667)
    • FAIL [expected TIMEOUT] subtest: Check that popups from a sandboxed iframe escape the sandbox if
      allow-popups-to-escape-sandbox is used assert_equals: It came from a sandboxed iframe expected "null" but got "http://web-platform.test:8000"
  • OK /html/semantics/forms/form-submission-0/form-submit-iframe-then-location-navigate.html (#29634)
    • PASS [expected FAIL] subtest: Verifies that location navigations take precedence when following form submissions.
  • OK /html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html (#23205)
    • FAIL [expected PASS] subtest: Check that rel=noopener with target=_self does a normal load this.openedWindow.findLink is not a function
  • PASS [expected CRASH] /streams/readable-streams/crashtests/strategy-worker-terminate.html (#30124)

@mukilan
Copy link
Member

mukilan commented Oct 6, 2023

@delan I believe try jobs use the CI configuration from master and not the PR, so you might have to run the job on your fork for testing.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

✨ Try run (#6430688359) succeeded.

@delan
Copy link
Member Author

delan commented Oct 9, 2023

Test builds for c5998d9:

@delan delan marked this pull request as draft October 11, 2023 08:07
@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

1 similar comment
@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan
Copy link
Member Author

delan commented Oct 11, 2023

@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan
Copy link
Member Author

delan commented Oct 11, 2023

@delan
Copy link
Member Author

delan commented Oct 18, 2023

Changing expectations for /css/css-color/currentcolor-003.html in layout 2013 from FAIL to CRASH, because it can’t be converted to a warning without modifying euclid, and it’s not clear to me how we can fix the underlying bug.

All other unexpected results should be covered by #30578 + #30590.

@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan
Copy link
Member Author

delan commented Oct 19, 2023

@delan delan force-pushed the try-with-debug-assertions branch from ccea918 to 6f1db35 Compare October 19, 2023 06:44
@delan
Copy link
Member Author

delan commented Oct 25, 2023

@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan delan requested a review from mukilan October 26, 2023 05:25
@servo-wpt-sync
Copy link
Collaborator

🛠 These changes could not be applied onto the latest upstream WPT. Servo's copy of the Web Platform Tests may be out of sync.

@delan delan requested a review from mukilan October 26, 2023 06:15
@delan
Copy link
Member Author

delan commented Oct 26, 2023

Great catch @mukilan, that would have broken the nightly release build.

Copy link
Member

@mukilan mukilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@delan delan enabled auto-merge October 26, 2023 06:24
@delan delan added this pull request to the merge queue Oct 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 26, 2023
@delan delan added this pull request to the merge queue Oct 26, 2023
Merged via the queue into servo:master with commit a3d2f0c Oct 26, 2023
@delan delan deleted the try-with-debug-assertions branch October 26, 2023 09:43
mrobinson added a commit that referenced this pull request Oct 27, 2023
mrobinson added a commit that referenced this pull request Oct 27, 2023
@mrobinson mrobinson mentioned this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug assertions don’t do anything on CI

3 participants