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)
Testing
Mochitest
Tracking
(firefox-esr115 wontfix, firefox-esr140 wontfix, firefox146 wontfix, firefox147 wontfix, firefox148 fixed)
RESOLVED
FIXED
148 Branch
People
(Reporter: robwu, Assigned: robwu)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [addons-jira])
Attachments
(2 files)
STR:
- Simulate an unexpected crash by adding
|| trueto the condition at https://searchfox.org/firefox-main/rev/20a1fb35a4d5c2f2ea6c865ecebc8e4bee6f86c9/testing/mochitest/tests/SimpleTest/TestRunner.js#758 - 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:
- The
await SpecialPowers.findUnexpectedCrashDumpFiles()call in TestRunner.js resolves to aProxyinstance (fromWrapPrivileged). This value is passed toTestRunner.structuredLogger.testStatus(...), and ends up being passed toCu.cloneInto. - Because
cloneIntois not able to clone aProxyinstance, it raises an errorError: Encountered unsupported value type writing stack-scoped structured clone. For some reason this error cannot be displayed, and we get a uselessJavaScript error: , line 0: uncaught exception: Objectinstead.
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
findUnexpectedCrashDumpFilesto return a value cloned into the right scope, to avoid the need for the wrapper. And then callSpecialPowers.unwrapon its return value, to counter the automatic wrapping applied toPromisereturn values. - to prevent similar errors from blowing up the test framework, modify StructuredLogger to catch serialization errors and display a meaningful warning.
Updated•6 months ago
|
Comment 1•6 months ago
|
||
Set release status flags based on info from the regressing bug 1801368
status-firefox146:
--- → affected
status-firefox147:
--- → affected
status-firefox148:
--- → affected
status-firefox-esr140:
--- → affected
| Assignee | ||
Comment 2•6 months ago
|
||
| Assignee | ||
Comment 3•6 months ago
|
||
Updated•6 months ago
|
Attachment #9534737 -
Attachment description: Bug 2007587 - Fix findUnexpectedCrashDumpFiles to avoid breaking mochitest TestRunner → Bug 2007587 - Fix findUnexpectedCrashDumpFiles to avoid breaking mochitest TestRunner
Pushed by rob@robwu.nl:
https://github.com/mozilla-firefox/firefox/commit/198fc64bac82
https://hg.mozilla.org/integration/autoland/rev/109a1104752b
Fix findUnexpectedCrashDumpFiles to avoid breaking mochitest TestRunner r=ahal
https://github.com/mozilla-firefox/firefox/commit/45290297179b
https://hg.mozilla.org/integration/autoland/rev/d31fa9669c92
Gracefully handle clone errors in StructuredLogger r=ahal
Comment 5•6 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/109a1104752b
https://hg.mozilla.org/mozilla-central/rev/d31fa9669c92
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
Comment 6•6 months ago
|
||
The patch landed in nightly and beta is affected.
:robwu, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox147towontfix.
For more information, please visit BugBot documentation.
Flags: needinfo?(rob)
Updated•6 months ago
|
status-firefox-esr115:
--- → wontfix
Flags: needinfo?(rob)
You need to log in
before you can comment on or make changes to this bug.
Description
•