Open
Bug 387709
Opened 18 years ago
Updated 2 years ago
Mailnews Datasources Leak
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
NEW
People
(Reporter: mscott, Unassigned)
References
Details
(Keywords: helpwanted, memory-leak)
Attachments
(3 files)
(deleted),
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mscott
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
See Bug 383939 for an explanation of what's going on.
I've got some patches coming up for this.
Reporter | ||
Comment 1•18 years ago
|
||
* convert the mObservers list from a nsISupportsArray to nsCOMArray so we can use the NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY macro.
* remove nsSoundDatasource which was not being built.
* make nsMsgRDFDatasource use the cycle collector. the account manager and folder data sources inherit from this base class.
To test this fix. I turned on the bloat log:
export XPCOM_MEM_LEAK_LOG=leaklog.txt
Started up Thunderbird and quit. Verified that the following objects were leaked:
* CompositeDataSourceImpl
* nsMsgAccountManagerDataSource (1)
* nsMsgFolderDataSource (2 of these: one for recent, one for all)
* nsMsgRDFDataSource (3)
I then repeated this test with this patch and verified that these objects get cycle collected on shut down and are no longer listed in the leak log.
Attachment #271891 -
Flags: superreview?(bienvenu)
Comment 2•18 years ago
|
||
Comment on attachment 271891 [details] [diff] [review]
[checked in]fix nsMsgRDFDatasource, nsMsgAccountDataSource and nsMsgFolderDatasource leaks
very nice - does this fix the big leak?
Attachment #271891 -
Flags: superreview?(bienvenu) → superreview+
Reporter | ||
Comment 3•18 years ago
|
||
sadly it doesn't fix the jscontext leak :(
Reporter | ||
Updated•18 years ago
|
Attachment #271891 -
Attachment description: fix nsMsgRDFDatasource, nsMsgAccountDataSource and nsMsgFolderDatasource leaks → [checked in]fix nsMsgRDFDatasource, nsMsgAccountDataSource and nsMsgFolderDatasource leaks
Updated•18 years ago
|
OS: Windows Vista → All
Hardware: PC → All
Comment 4•18 years ago
|
||
Needs mlk key word
Comment 5•18 years ago
|
||
Scott: are you intending on fixing up the address book rdf datasource in this bug as well?
Reporter | ||
Comment 6•18 years ago
|
||
yeah I actually wrote a patch for the address book data source but was having a hard time getting some of the thread proxy stuff working with it. I'll post what I had and we can go from there...
Reporter | ||
Comment 7•17 years ago
|
||
Here's the patch I put together for the address book data source. I hadn't gotten around to testing the scenario where the NotifyObservers is called from a thread other than the main thread...
Reporter | ||
Comment 8•17 years ago
|
||
Comment on attachment 273722 [details] [diff] [review]
[checked in]patch for the address book data source
This fixes the leak for me Mark.
Attachment #273722 -
Flags: superreview?(bugzilla)
Comment 9•17 years ago
|
||
Comment on attachment 273722 [details] [diff] [review]
[checked in]patch for the address book data source
Yep looks good to me, certainly didn't manage to break it in my testing ;-)
Though I can only give r+ not sr+
Attachment #273722 -
Flags: superreview?(bugzilla) → review+
Reporter | ||
Updated•17 years ago
|
Attachment #273722 -
Attachment description: patch for the address book data source → [checked in]patch for the address book data source
Comment 10•17 years ago
|
||
Comment on attachment 273722 [details] [diff] [review]
[checked in]patch for the address book data source
>Index: nsAbRDFDataSource.cpp
>===================================================================
>+NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsAbRDFDataSource)
>+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMARRAY(mObservers)
>+ NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY(mProxyObservers)
This needs to use NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMARRAY, not _UNLINK_
Comment 11•17 years ago
|
||
Fixes the incorrect macro in the address book data source (see comment 10).
Attachment #287313 -
Flags: superreview?(mscott)
Attachment #287313 -
Flags: review?(mscott)
Reporter | ||
Comment 12•17 years ago
|
||
Comment on attachment 287313 [details] [diff] [review]
[checked in]Fix unlink/traverse per comment 10
thanks Mark.
Attachment #287313 -
Flags: superreview?(mscott)
Attachment #287313 -
Flags: superreview+
Attachment #287313 -
Flags: review?(mscott)
Attachment #287313 -
Flags: review+
Updated•17 years ago
|
Attachment #287313 -
Attachment description: Fix unlink/traverse per comment 10 → [checked in]Fix unlink/traverse per comment 10
Comment 13•17 years ago
|
||
mark, you probably should take this on?
Assignee: mscott → bugzilla
Flags: blocking-thunderbird3+
Updated•17 years ago
|
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3-
Flags: blocking-thunderbird3+
Priority: -- → P3
Assignee | ||
Updated•16 years ago
|
Product: Core → MailNews Core
Comment 15•16 years ago
|
||
(In reply to comment #14)
> Mark, status update?
This seems quite complicated. I'm not sure Scott's original changes were 100% correct, plus we have lots of other potential leaks at the moment.
I just took a look at this again, but based on my 1 hour look, I doubt I'm going to get to this before b1.
Target Milestone: Thunderbird 3.0b1 → Thunderbird 3.0b2
Updated•16 years ago
|
Target Milestone: Thunderbird 3.0b1 → Thunderbird 3.0rc1
Updated•15 years ago
|
Severity: normal → minor
Updated•15 years ago
|
Assignee: bugzilla → nobody
Keywords: helpwanted
Priority: P3 → --
Target Milestone: Thunderbird 3.0rc1 → ---
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•