Closed
Bug 129312
Opened 24 years ago
Closed 24 years ago
leaking msg hdrs again, so db's don't get closed
Categories
(MailNews Core :: Backend, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: Bienvenu, Assigned: Bienvenu)
Details
Attachments
(1 file)
|
3.05 KB,
patch
|
naving
:
review+
sspitzer
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
In the past few days, we've started leaking msg hdrs again when switching
folders, so we leave the db's open and the memory starts to bloat. Not sure what
change caused this - a build from two weeks ago didn't have this problem, and I
think it was really in the past 5 days or so that this was broken.
Updated•24 years ago
|
| Assignee | ||
Comment 1•24 years ago
|
||
March 1 build is fine.
| Assignee | ||
Comment 2•24 years ago
|
||
March 4th build seems OK too. So it's just one of the few hundred checkins
between the 4th and 6th.
| Assignee | ||
Comment 3•24 years ago
|
||
03/05 build seems to have this problem, so it was probably a checkin between
03/04 and 03/05, most likely one of these:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=03%2F04%2F2002+08%3A00%3A00&maxdate=03%2F05%2F2002+08%3A00%3A00&cvsroot=%2Fcvsroot
| Assignee | ||
Comment 4•24 years ago
|
||
OK, this is caused by Sean's checkin of Neil's perfectly harmless-looking patch
to check the imap deleted flag for that .01% of the user base that use that
delete model:
return gDBView.hdrForFirstSelectedMessage.flags & MSG_FLAG_IMAP_DELETED;
this gets the header object into js, where it may or may not ever be garbage
collected. If I comment this out, we close the db's correctly again.
This was bug 82056. An easy way to fix this is to never allow the hdr into js,
and just add a method to get the flag for the first selected message. We don't
ever need to get the header anyway, since the view maintains the flags
separately for display purposes. I'll look into a fix for this.
oops, I meant to say: That would take care of bug 128916 which helps out with
bug 30560.
| Assignee | ||
Comment 7•24 years ago
|
||
If I clear the message window by doing multiple selection, before selecting
another folder, the hdr is garbage collected. But if I don't, as near as I can
tell, the header is never released. I've also found that other callers of
hdrForFirstSelectedMessage (e.g., as used to init the mark menu) also cause this
leak. I'm worried that there's something very strange going on here, so I might
need to spend some time getting to the bottom of it instead of just fixing the
immediate cause of the problem.
| Assignee | ||
Comment 8•24 years ago
|
||
OK, I've found the root cause of this problem - it's all my fault. When I added
code to make sure we didn't crash trying to free headers that belong to db's
that have been forced closed, I cleared out the mdb row pointer in the header.
This worked fine if no one was holding onto the header after you switch folders,
but the imap delete menu code made it so that someone was always holding onto a
header. Fix upcoming, please review.
| Assignee | ||
Comment 9•24 years ago
|
||
The fix is to only clear out the db row member variable in the msg hdr if the
db is actually going away, e.g., we're clearing out the cache from
::ForceClosed. Please review.
| Assignee | ||
Comment 10•24 years ago
|
||
Navin, can you review? thx.
Comment 11•24 years ago
|
||
Comment on attachment 72864 [details] [diff] [review]
proposed fix
r=naving
Attachment #72864 -
Flags: review+
Comment 12•24 years ago
|
||
Comment on attachment 72864 [details] [diff] [review]
proposed fix
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #72864 -
Flags: approval+
Comment 13•24 years ago
|
||
Comment on attachment 72864 [details] [diff] [review]
proposed fix
sr=sspitzer
Attachment #72864 -
Flags: superreview+
Comment 14•24 years ago
|
||
Is this the likely cause for why the mail tinderbox leak numbers went up?
http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey-Testerbox
| Assignee | ||
Comment 15•24 years ago
|
||
If you're talking about the change from 1.21MB to 1.22MB, that looks like it
happened around the time of darin's uri changes. This doesn't cause a leak
because we clean up open db's at shutdown time anyway.
| Assignee | ||
Comment 16•24 years ago
|
||
fixed
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA Contact: esther → stephend
using bienvenu's testcase in comment 7 with the latest trunk Windows 2000 build
under Purify, I don't see this leak.
Verified FIXED.
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•