Closed Bug 498307 Opened 16 years ago Closed 16 years ago

Various mailnews tests leak nsSocketTransport, nsStringBuffer, nsThread and others (fakeserver related?)

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

After part 2 of bug 438922 has landed to clean up the leak logs, there will be remaining some leaks that are seen across mailnews, I think just when using fakeserver in tests (but not always). Typical log entry: == BloatView: ALL (cumulative) LEAK STATISTICS |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->| Per-Inst Leaked Total Rem Mean StdDev Total Rem Mean StdDev 0 TOTAL 26 2380 13429 8 ( 114.84 +/- 125.76) 47844 12 ( 128.15 +/- 150.36) 45 nsAStreamCopier 60 60 4 1 ( 2.29 +/- 1.11) 403 1 ( 8.38 +/- 1.70) 176 nsPipe 152 152 4 1 ( 2.29 +/- 1.11) 260 2 ( 23.04 +/- 7.66) 191 nsRecyclingAllocatorImpl 48 48 1 1 ( 1.00 +/- 0.00) 8 1 ( 2.00 +/- 0.93) 205 nsSocketTransport 296 296 2 1 ( 1.33 +/- 0.58) 98 2 ( 12.01 +/- 4.34) 206 nsSocketTransportService 1684 1684 1 1 ( 1.00 +/- 0.00) 279 3 ( 12.12 +/- 2.44) 212 nsStringBuffer 8 8 3198 1 ( 200.10 +/- 161.50) 3580 1 ( 214.91 +/- 165.30) 222 nsThread 72 72 3 1 ( 1.80 +/- 0.84) 1580 1 ( 353.47 +/- 198.20) 224 nsTimerImpl 60 60 7 1 ( 3.77 +/- 1.96) 44 1 ( 8.21 +/- 3.63) This bug will cover all the leaks of this style in whichever mailnews test file unless we discover that it is an issue in the structure of the test files, at which point we can revisit this decision.
Flags: wanted-thunderbird3+
No longer depends on: 438922
Attached patch The fix (deleted) — Splinter Review
Turns out this is quite simple - we're not closing the output stream object that's attached to the transport - hence it keeps the transport open. Adding a close when we close the transport works nicely. This cleans up most of the fake server tests. Although this test does make it obvious that we have an intermittent leak of a nsBaseAppShell and a nsRunnable in the mailnews/imap tests which I believe is due to how we are shutting the imap run thread down, so I'll file a separate bug for those.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #384313 - Flags: review?(bienvenu)
(In reply to comment #2) > obvious that we have an intermittent leak of a nsBaseAppShell and a nsRunnable MacOSX bug 472773?!
(In reply to comment #3) > MacOSX bug 472773?! Obviously not, as boxes report it on Linux and Windows :->
Attachment #384313 - Flags: review?(bienvenu) → review+
This bug is not a regression - afaik it would have happened ever since we started the fake servers, we just had no way of finding it.
Keywords: regression
Filed bug 499644 on the nsRunnable/nsBaseAppShell leak. Checked in patch: http://hg.mozilla.org/comm-central/rev/b546a5072e6f
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: