Closed Bug 349379 Opened 19 years ago Closed 19 years ago

nsIUpdateTimerManager registerTimer is leaking

Categories

(Toolkit :: Application Update, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)

References

Details

(Keywords: fixed1.8.1, memory-leak)

Attachments

(2 files)

Found while debugging bug 349173. For each registerTimer I see 48 leaks.
Perhaps related to bug 321667 (though that bug is pretty low on details, and indicates that it may be fixed).
Yep... I suspect this is a duplicate of that bug... I searched, I swear I did. :)
Summary: nsIUpdateTimerManager is leaking → nsIUpdateTimerManager registerTimer is leaking
Keywords: mlk
This isn't a duplicate of bug 321667, but the root cause could be related. I think this may have something to do with how these timers persist across shutdown; e.g. they're never canceled. The update service seems to be removing references to its timers on shutdown properly, though: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in&rev=1.116&mark=2563-2564#2554.
Severity: normal → major
Flags: blocking1.9?
OS: Windows XP → All
Hardware: PC → All
Attached patch patchSplinter Review
Leak stats Before patch: Per-Inst Leaked 74 XPCWrappedNative 56 1176 584 nsXPCWrappedJS 48 192 585 nsXPCWrappedJSClass 44 88 610 xptiInterfaceInfo 20 40 After patch: Per-Inst Leaked 74 XPCWrappedNative 56 1176
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #237702 - Flags: review?(benjamin)
(In reply to comment #4) > Leak stats > Before patch: > Per-Inst Leaked > 74 XPCWrappedNative 56 1176 Should be 74 XPCWrappedNative 56 1400
Comment on attachment 237702 [details] [diff] [review] patch We're sure that the timers have already been canceled?
Attachment #237702 - Flags: review?(benjamin) → review+
These are actually timer callbacks and not timers which is used from the single nsITimer in nsIUpdateTimerManager Checked in to trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
This looks good! From Linux balsa-trunk Dep GTK1 (gcc 3.4) --FIXED-LEAKS---------------------------------leaks------leaks% XPCWrappedNative 1120 -16.67% nsXPCWrappedJSClass 0 -100.00% nsXPCWrappedJS 0 -100.00% xptiInterfaceInfo 0 -100.00% TOTAL 1120 Before: RLk:2.30KB Lk:347KB MH:13.1MB A:585K After: RLk:1.77KB Lk:269KB MH:13.1MB A:475K
Flags: blocking1.9?
Comment on attachment 237702 [details] [diff] [review] patch Drivers, a simple fix for a memory leak where gc requires an extra cycle to collect which won't happen since we are shutting down.
Attachment #237702 - Flags: approval1.8.1?
Comment on attachment 237702 [details] [diff] [review] patch a=schrep
Attachment #237702 - Flags: approval1.8.1? → approval1.8.1+
Checked in to MOZILLA_1_8_BRANCH --FIXED-LEAKS---------------------------------leaks------leaks% XPCWrappedNative 224 -50.00% nsXPCWrappedJSClass 0 -100.00% xptiInterfaceInfo 0 -100.00% nsXPCWrappedJS 0 -100.00% TOTAL 224 Before: RLk:1.71KB Lk:274KB MH:13.0MB A:898K After: RLk:1.18KB Lk:254KB MH:12.3MB A:885K
Keywords: fixed1.8.1
Very nice... -23.05% leaks on trunk -31.12% leaks on MOZILLA_1_8_BRANCH
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: