ccov mochitest jobs time out after the last test passes when a content process exits during the final coverage flush
Categories
(Testing :: Code Coverage, defect)
Tracking
(firefox163 fixed)
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: calixte, Assigned: calixte)
References
(Regression)
Details
(Keywords: regression)
Crash Data
Attachments
(1 file, 1 external file)
|
2.26 KB,
application/x-javascript
|
Details |
Since bug 2077159 re-landed on 2026-11-16, several Android ccov mochitest-plain chunks on mozilla-central get killed with "application timed out after 370 seconds with no output", after their last test has passed (the crash signature is the harness kill, @ libc.so + 0xb94da). The chunks affected include dom/serviceworkers, dom/base/test/jsmodules, dom/ipc/tests, dom/security/permissionspolicy, dom/security/test/mixedcontentblocker, dom/tests/mochitest/storageevent and toolkit/components/pdfjs/test (bug 2094061). The last mozilla-central push without the re-land had all its Android ccov mochitest-plain jobs green, the first one with it had five of them killed this way, and none were seen in the two weeks before.
At the end of a suite, TestRunner now awaits SpecialPowers.requestFinalDumpCoverageCounters(), which goes through nsCodeCoverage::Request. The logcats show a content process being torn down (the last frame it hosted is gone) a few ms after the flush request was sent to it. The IPC reply is then rejected with ActorDestroyed, Request rejects the whole promise, TestRunner throws an uncaught exception, and the harness never logs SimpleTest FINISHED. Request also counts the live processes before the parent flush (which takes about 2 s on the emulator) and only sends the requests afterwards, so a process dying in between is counted but never asked, and the promise never settles.
This is not Android specific: a browser-chrome test killing a content process right after flushCounters() is called fails every time on a desktop ccov build (the flush is rejected), and passes once a dying process is counted as done.
A second variant is seen in a dom/file/tests chunk: no rejection, but the surviving children never finish their flush. A plausible cause is the dying child being killed while holding the CrossProcessMutex taken in CodeCoverageHandler::FlushCounters, which is not robust on POSIX, so its owner dying leaves it locked forever. Win32 mutexes are released when their owner dies, so this can only happen on Linux, macOS and Android.
| Assignee | ||
Comment 1•10 days ago
|
||
A content process shutting down while the counters are flushed (e.g. right
after the last frame it hosted was removed) rejected the whole request, so
the final dump at the end of a mochitest suite threw and the harness timed
out without printing its summary.
The live processes were also counted before the parent flush, which can take
a few seconds, so a process dying in between was never sent the request and
the promise never settled.
Comment 4•10 days ago
|
||
Copying crash signatures from duplicate bugs.
| Comment hidden (Intermittent Failures Robot) |
Comment 8•8 days ago
|
||
| bugherder | ||
| Comment hidden (Intermittent Failures Robot) |
Description
•