Upload a minidump for force-killed hung xpcshell processes on timeout
Categories
(Testing :: XPCShell Harness, task)
Tracking
(firefox155 fixed)
| Tracking | Status | |
|---|---|---|
| firefox155 | --- | fixed |
People
(Reporter: florian, Assigned: florian, NeedInfo)
References
(Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(2 files)
|
7.57 KB,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
When the xpcshell harness force-kills a hung test process on timeout, the minidump it takes is currently discarded: testTimeout returns before run_test's normal checkForCrashes, so the dump is never saved to the upload directory (and on Linux/macOS postCheck's SIGKILL races the in-progress SIGABRT Breakpad dump, truncating it). A hung/timed-out test therefore leaves no dump to inspect.
Make the harness preserve it: after killTimeout, wait (bounded) for the process to finish writing its minidump, then run checkForCrashes, which copies the .dmp to the upload dir as a test artifact and symbolicates its thread stacks into the log. The test is still reported as TIMEOUT, and the log states the dump is the force-killed process, not a real crash (buffered as a test message so a retried run keeps it out of the failure summary).
This matters most for a hard deadlock in the profiler itself (bug 1687510): the sampler thread is stuck, so no profile can be produced, and the force-killed process's minidump is the only diagnostic.
Depends on bug 2052043 (builds on its reportTimeoutResult / self-exit / safety-net-kill work). With both bugs fixed we should now have profiles uploaded for timeouts due to the test taking too long, and we should have a crash dump uploaded for hard deadlocks (especially profiler deadlocks).
| Assignee | ||
Comment 1•27 days ago
|
||
I used this patch to reproduce a(n artificial) profiler deadlock on try. For it to cause a deadlock, the try push needs to be made with --env MOZ_TEST_PROFILER_DEADLOCK=1.
Here's the try result of this bug: https://treeherder.mozilla.org/jobs?repo=try&revision=25b739100566d72889ed1445514c316f6311b6d2
| Assignee | ||
Comment 2•27 days ago
|
||
When the harness force-kills a hung test on timeout, testTimeout returned before
run_test's normal checkForCrashes, so the minidump was never saved to the upload
directory. On Linux/macOS kill_and_get_minidump only sends SIGABRT (the process
writes the dump itself via Breakpad), and postCheck's SIGKILL raced the
in-progress dump.
Wait, bounded by TIMEOUT_MINIDUMP_WAIT, for the process to finish writing its
minidump, then run checkForCrashes so the dump is uploaded as a test artifact and
its thread stacks are symbolicated into the log. The test is still reported as
TIMEOUT; the "not a real crash" note is buffered as a test message so a retried
run keeps it out of the failure summary.
Comment 5•21 days ago
|
||
Backed out for causing Xpcshell failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/67c45fd4ba0a
Description
•