Closed Bug 2007587 Opened 6 months ago Closed 6 months ago

Mochitests time out when an unexpected crash dump exists, instead of logging "unexpected-crash-dump-found"

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(firefox-esr115 wontfix, firefox-esr140 wontfix, firefox146 wontfix, firefox147 wontfix, firefox148 fixed)

RESOLVED FIXED
148 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox146 --- wontfix
firefox147 --- wontfix
firefox148 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [addons-jira])

Attachments

(2 files)

STR:

  1. Simulate an unexpected crash by adding || true to the condition at https://searchfox.org/firefox-main/rev/20a1fb35a4d5c2f2ea6c865ecebc8e4bee6f86c9/testing/mochitest/tests/SimpleTest/TestRunner.js#758
  2. Run a mochitest, e.g. ./mach test toolkit/components/extensions/test/mochitest/test_check_startupcache.html --log-mach-verbose

Expected:

  • Test runs to completion and logs ERROR unexpected-crash-dump-found - This test left crash dumps behind, but we weren't expecting it to!

Actual:

  • Logs JavaScript error: , line 0: uncaught exception: Object
  • Test gets stuck, and logs FAIL Test timed out. - after 5 minutes.

This is a reduced test case from bug 2002676, https://bugzilla.mozilla.org/show_bug.cgi?id=2002676#c44

Explanation:

This is a regression by bug 1801368, which introduced the cloneInto call. Previously, the value would be passed, and callees who did not care would just ignore it.

To fix the issue, I propose:

  • to modify findUnexpectedCrashDumpFiles to return a value cloned into the right scope, to avoid the need for the wrapper. And then call SpecialPowers.unwrap on its return value, to counter the automatic wrapping applied to Promise return values.
  • to prevent similar errors from blowing up the test framework, modify StructuredLogger to catch serialization errors and display a meaningful warning.

Set release status flags based on info from the regressing bug 1801368

Attachment #9534737 - Attachment description: Bug 2007587 - Fix findUnexpectedCrashDumpFiles to avoid breaking mochitest TestRunner → Bug 2007587 - Fix findUnexpectedCrashDumpFiles to avoid breaking mochitest TestRunner
See Also: → 2007615
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch

The patch landed in nightly and beta is affected.
:robwu, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(rob)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: