Closed Bug 528411 Opened 15 years ago Closed 15 years ago

e10s: TEST-UNEXPECTED-FAIL | plugin process 10610 | automationutils.processLeakLog() | missing output line for total leaks!

Categories

(Core :: IPC, defect)

Other Branch
x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: benjamin, Unassigned)

References

Details

both Linux and Windows e10s tinderboxes are showing this:
TEST-UNEXPECTED-FAIL | plugin process 10610 | automationutils.processLeakLog() | missing output line for total leaks!

When I run the tests locally in a debug build, I instead get:
== BloatView: ALL (cumulative) LEAK AND BLOAT STATISTICS, plugin process 28188

     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev

   0 TOTAL                                          42        8     7448        1 (   59.65 +/-    59.95)    21760        1 (   53.52 +/-    63.62)

  91 nsStringBuffer                                  8        8     1344        1 (   78.75 +/-    33.60)     2665        1 (   88.87 +/-    33.89)

nsTraceRefcntImpl::DumpStatistics: 125 entries

Serial Numbers of Leaked Objects:
TEST-UNEXPECTED-FAIL | plugin process 28188 | automationutils.processLeakLog() | leaked 8 bytes during test execution
TEST-UNEXPECTED-FAIL | plugin process 28188 | automationutils.processLeakLog() | leaked 1 instance of nsStringBuffer with size 8 bytes

Thoughts: is the plugin process shutdown synchronous? Is it possible the main process shuts down, the runtests log parser goes to work, but the plugin process hasn't actually written out its leak log yet?

It's likely that leaking a single string is just a stack object in one of the functions which calls NS_LogInit, but I can't figure out a simple way to get a refcount balance for nsStringBuffer from the child process, because just setting the environment variable ends up giving me a refcount balance for *both* processes, which is no good.
I need to try to repro this locally, but I notice this failure is preceded by:

230 ERROR TEST-UNEXPECTED-FAIL | /tests/modules/plugin/test/test_windowed_invalidate.html | Test timed out.

Possibly the plugin process isn't terminating at all (since bug 523208 hasn't landed yet), and that's why the leak log is empty.
I have been unable to repro this locally so far.  If this is caused by asynchronous shutdown of the plugin process, the patch in bug 523208 should solve it, as that causes the runtests app runner to wait for any running processes to shutdown before the leak log parser is invoked.
I had to hack synchro-shutdown for xpcshell tests to function correctly, too. I think it's quite likely that that is the problem. And plugin shutdown is definitely not sync right now. Adding bug 523208 to our landing blocker.
Hrm, this concerns me. The main process should never be shutting down while there are plugin processes alive: it should either synchronously wait for them to shut down, or kill them off (depending on whether we want leak logging). So hacking the test harness to wait on zombie processes doesn't sound like the right solution.
cjones found it! the early _exit(0) was causing us to skip all that pesky leak detection in non-DEBUG builds.
http://hg.mozilla.org/projects/electrolysis/rev/e87bbd2bc85f
Linux and Windows mochitest-ipc went green after e87bbd2bc85f.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.