Closed
Bug 349379
Opened 19 years ago
Closed 19 years ago
nsIUpdateTimerManager registerTimer is leaking
Categories
(Toolkit :: Application Update, defect)
Toolkit
Application Update
Tracking
()
RESOLVED
FIXED
People
(Reporter: robert.strong.bugs, Assigned: robert.strong.bugs)
References
Details
(Keywords: fixed1.8.1, memory-leak)
Attachments
(2 files)
|
882 bytes,
patch
|
benjamin
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
|
5.47 KB,
text/plain
|
Details |
Found while debugging bug 349173. For each registerTimer I see 48 leaks.
Comment 1•19 years ago
|
||
Perhaps related to bug 321667 (though that bug is pretty low on details, and indicates that it may be fixed).
| Assignee | ||
Comment 2•19 years ago
|
||
Yep... I suspect this is a duplicate of that bug... I searched, I swear I did. :)
Summary: nsIUpdateTimerManager is leaking → nsIUpdateTimerManager registerTimer is leaking
Comment 3•19 years ago
|
||
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
| Assignee | ||
Comment 4•19 years ago
|
||
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)
| Assignee | ||
Comment 5•19 years ago
|
||
(In reply to comment #4)
> Leak stats
> Before patch:
> Per-Inst Leaked
> 74 XPCWrappedNative 56 1176
Should be
74 XPCWrappedNative 56 1400
| Assignee | ||
Comment 6•19 years ago
|
||
Comment 7•19 years ago
|
||
Comment on attachment 237702 [details] [diff] [review]
patch
We're sure that the timers have already been canceled?
Attachment #237702 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 8•19 years ago
|
||
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
| Assignee | ||
Comment 9•19 years ago
|
||
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
| Assignee | ||
Updated•19 years ago
|
Flags: blocking1.9?
| Assignee | ||
Comment 10•19 years ago
|
||
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 11•19 years ago
|
||
Comment on attachment 237702 [details] [diff] [review]
patch
a=schrep
Attachment #237702 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 12•19 years ago
|
||
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
| Assignee | ||
Comment 13•19 years ago
|
||
Very nice...
-23.05% leaks on trunk
-31.12% leaks on MOZILLA_1_8_BRANCH
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•