Open Bug 1330085 Opened 7 years ago Updated 2 years ago

Window/docshell leak detector does not work with --repeat

Categories

(Testing :: Mochitest, task, P3)

Version 3
task

Tracking

(Not tracked)

People

(Reporter: mccr8, Unassigned)

Details

Gabor pointed out that the window/docshell leak detector reports leaks with --repeat, even in single process mode, in a test case he gave.

I think this could be related to bug 1330018. I noticed that with e10s multi the pref dom.ipc.keepProcessesAlive is set, which may behave similarly to --repeat.

The first problem I have noticed is that we only get the "Completed ShutdownLeaks collections" message once for each process. A hacky fix for this is to get rid of the removeMessageListener call for "browser-test:collect-request", so we can do the cleanup collections for a given process more than once, but I should try to understand why that helps. Well, it looks like maybe for --repeat it only calls testInit once per test, which would explain why it wouldn't work there.
The second problem I think is that in leaks.py seenShutdown (a set of pids we've seen collection messages for) is monotonic, so if we send browser-test:collect-request to a process more than once, we treat the very first time it finishes as the deadline that all windows should have been cleaned up by. I'll have to figure out some way to deal with that.
Well, looking at some of the other leaks, I don't think this is related. From the logs, everything looks reasonable, in terms of properly running the collection in the child process, and in terms of the test harness checking where the collection ran, so I'll put this aside for now.
No longer blocks: 1330018
Assignee: continuation → nobody
Type: defect → task
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.