Open Bug 2088064 Opened 26 days ago Updated 19 days ago

Error summary reports test groups as OK when they had LeakSanitizer or ThreadSanitizer failures

Categories

(Testing :: Mozbase, defect)

defect

Tracking

(Not tracked)

People

(Reporter: marco, Unassigned)

References

Details

ErrorSummaryFormatter has no handler for the lsan_leak and tsan_error structured log actions, so they are dropped from the error summary and never affect the status of the group they happened in. Tasks that fail because of a LeakSanitizer leak or a ThreadSanitizer report end up with an error summary where every group is OK, so tools that rely on the group results to classify or retrigger failures see a failed task without any failing group.

Examples from the last two weeks:

  • LeakSanitizer, mochitest: OWkrMyP0R8Wf8BTpuhK47A (mochitest-browser-chrome on mozilla-beta). The leaks are scoped to browser/extensions/webcompat/tests/browser/browser_ua_helpers.js, browser_special_content_scripts.js and browser.toml, but all 11 groups are OK. The only trace in the error summary is a list of group-less log lines.
  • LeakSanitizer, wpt: AfmdabNlTumuNyEFVzDDqA (web-platform-tests on mozilla-esr153) and UQSYmqNtQKKhdOOB8paxHA (web-platform-tests-wdspec on autoland). The leaks are reported right after the browser for the /mediasession and /webdriver/tests/bidi/network/fetch_error groups exits, with that group as their scope, but the error summary has no trace of them and all groups are OK.
  • ThreadSanitizer, mochitest: WE2lNUz5TEmqIeWzBzVV1A (mochitest-media on autoland). A data race report aborted a content process while test_enumerateDevices_legacy.html was running. The harness reported Failed: 0 and all groups are OK; the task only fails because mozharness matches "A content process crashed".

In all these cases the harness already knows which group the report belongs to: the browser is restarted at group boundaries, and the actions carry a scope (the group, the manifest or the test that was running). The group should be marked as failed, as it is for crashes. Leaks with an allowed_match (expected leaks) should not affect the group.

ThreadSanitizer also reports deadly signals (e.g. SEGV), which are crashes that tests may expect, such as deliberate tab crashes; those are better left to crash handling. UndefinedBehaviorSanitizer reports (ubsan_error) are not fatal and do not fail the task, so marking groups as failed for them would make the error summary disagree with the task result.

Florian, is it on purpose that UndefinedBehaviorSanitizer reports don't fail tasks?

Flags: needinfo?(florian)
See Also: → 2088062
See Also: → 2088049

(In reply to Marco Castelluccio [:marco] from comment #1)

Florian, is it on purpose that UndefinedBehaviorSanitizer reports don't fail tasks?

I would guess no, but I know almost nothing about them.

Flags: needinfo?(florian)
See Also: → 2090903
See Also: → 2090907
You need to log in before you can comment on or make changes to this bug.