Closed
Bug 114211
Opened 23 years ago
Closed 20 years ago
Request MSF files be closed when not in use (pop3 filter only!)
Categories
(MailNews Core :: Backend, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: superbiskit, Assigned: Bienvenu)
References
Details
(Keywords: fixed-aviary1.0)
Attachments
(4 files, 2 obsolete files)
1022 bytes,
patch
|
cavin
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
4.83 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
2.21 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
1021 bytes,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
Machines will go down - Windoze more often than some. Mozilla keeps as many as 60 or more .MSF files open after a transfer-filter operation. Because they are open, if the system crashes they are all found to be damaged on reboot. The disk scan reports a SizeError in the allocation for a very large number of the .MSF files; I have found there is no way to "fix" the files - they need to be deleted. The disk scan then discovers over a Meg of file space marked as InUse but not allocated to any file. My recommendation would be to close the files after the transfer-filter operation completes -- this will update the directory allocations and flush the cache, then re-open as needed to satisfy the user's operations. Damage is much less likely when the files are not being extended - rewrite in place is probably not a big vulnerability.
Comment 1•23 years ago
|
||
confirming, but the performance impact should be investigated...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•23 years ago
|
||
reassigning to bienvenu. This sounds like the conversation we had last week where it looked like we were closing everything down.
Assignee: mscott → bienvenu
Assignee | ||
Comment 3•23 years ago
|
||
it's not dataloss, since those files don't have any information that can't be recreated. Also, the files aren't corrupt - the data in them has been written out to disk.
Summary: Request MSF files be closed when not in use -- AVOID DATALOSS → Request MSF files be closed when not in use
Reporter | ||
Comment 4•23 years ago
|
||
I won't argue the first point - although I don't agree. However, if the filesystem structures aren't updated the file is damned well corrupt, whether the data bits happen to be in some unreachable sector of the disk or not! Obviously, some files are open and thus at risk all the time. The fault is that there are far far too many. It's not like this was a real operating system, after all; the application needs to minimize its exposure to the inevitable badness.
Assignee | ||
Comment 5•23 years ago
|
||
Sorry if I wasn't clear, the data is recreated automatically by mozilla, because all the info is stored either on the server or in your local mailbox (I'm guessing you're a pop3 user). I'm not being argumentative, but dataloss has a serious meaning and we shouldn't cheapen it by using it where it doesn't apply. We attempt to close db's when not in use, but unfortunately there is client code that leaks objects that prevent the db from being closed. We're trying to track down those leaks but it's not trivial.
Assignee | ||
Comment 6•23 years ago
|
||
right now, we're only closing db's after you read a folder, and after you search a folder, but not after messages get moved into target folders. I can add code to do that.
Assignee | ||
Comment 7•23 years ago
|
||
actually, I think there's some sort of leak in the copy code that's holding the db's open. I thought it might have been the undo code, but now I think it might be the move copy state, or the js.
Updated•23 years ago
|
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Comment 8•23 years ago
|
||
closing mail/news (leaving the browser open) should release the .msf files, rite?
Updated•23 years ago
|
Target Milestone: mozilla0.9.9 → mozilla1.0
Assignee | ||
Comment 9•22 years ago
|
||
I'm a little torn about how to fix this. I could just close db's of folders that get messages moved/copied into them. That would be fairly easy and would keep most db's closed. Or, I could do something more general and close db's after they've been inactive for a certain period of time (e.g., 5 minutes). This would avoid the overhead of opening and closing db's a lot, and would also allow us to close the Sent and Trash folder db's occasionally (we'd keep the inbox open because it's used for check for new mail). The more general approach is a bit harder to code (and risky until they fix the timer implementation!) but the easier approach has the disadvantage of potentially causing us to open and close db's frequently. For example, we'd have to keep the trash db out of this entirely because otherwise we'd open and close the trash db on every message delete, and trash folders can get quite large.
Reporter | ||
Comment 10•22 years ago
|
||
RE: "I'm a little torn about how to fix this. I could just close db's of folders that get messages moved/copied into them. That would be fairly easy and would keep most db's closed. . . . ." 1) The trash folder is slightly less important because it won't often matter if the database file gets stomped. 2) There are cycles of a sort in the "usual" usage. Specifically the periodic download from the server will probably open as many DB's as the system will allow. When you complete the download, close all open DB's. That makes them safer. When the user selects a folder in FolderPane, open that DB; it would be vulnerable but only one or two DB's would be. It is somewhat less likely that the user is ploughing through more than one or two folders at a time.
Assignee | ||
Comment 11•22 years ago
|
||
Assignee | ||
Comment 12•22 years ago
|
||
this patch is in ClearCopyState, and closes the local mail folder db after move copy, if it's not the inbox or trash.
Assignee | ||
Comment 13•22 years ago
|
||
Cavin, can I get a review? thx.
Comment 14•22 years ago
|
||
Comment on attachment 73201 [details] [diff] [review] diffs to close imap folder when destination of move/copy sr=sspitzer do we also want to keep the sent folder open?
Attachment #73201 -
Flags: superreview+
Comment 15•22 years ago
|
||
Comment on attachment 73203 [details] [diff] [review] close destination local mail folder db after move/copy 1) instead of the CID, please use NS_MSGMAILSESSION_CONTRACTID 2) how about: if (NS_SUCCEEDED(rv) && session) { PRBool folderOpen; session-> } one less nested if. do we need to initialize folderOpen?
Attachment #73203 -
Flags: superreview+
Assignee | ||
Comment 16•22 years ago
|
||
my feeling is no for the sent folder. My reasoning was that message composition and sending is relatively heavy-weight. I don't think that this code will cause the sent folder db to get closed anyway, for the imap case, since that runs a different kind of url. I think it might close it for the local mail case.
Assignee | ||
Comment 17•22 years ago
|
||
I also fixed the imap code to use the contract id.
Attachment #73203 -
Attachment is obsolete: true
Comment 18•22 years ago
|
||
Comment on attachment 73201 [details] [diff] [review] diffs to close imap folder when destination of move/copy r=cavin.
Attachment #73201 -
Flags: review+
Comment 19•22 years ago
|
||
Comment on attachment 73221 [details] [diff] [review] new patch for local mail incorporating sr comments r=cavin.
Attachment #73221 -
Flags: review+
Comment 20•22 years ago
|
||
Comment on attachment 73221 [details] [diff] [review] new patch for local mail incorporating sr comments sr=sspitzer
Attachment #73221 -
Flags: superreview+
Comment 21•22 years ago
|
||
Comment on attachment 73221 [details] [diff] [review] new patch for local mail incorporating sr comments a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #73221 -
Flags: approval+
Assignee | ||
Comment 22•22 years ago
|
||
this patch fixes the imap case, and fixes the local case of moving messages between local folders, but it doesn't fix the case of pop filters moving messages into local folders, because that doesn't go through the move/copy code. Unfortunately, I suspect the pop case is what this bug was filed for. To fix that, I'd need to add some code to nsPop3Sink::EndMailDelivery() that closes any open db's on that mail account (other than inbox and trash). I'll still check this patch in, but I'll attach a new patch for the pop filter case.
Reporter | ||
Comment 23•22 years ago
|
||
I can confirm <bienvenu@netscape.com>'s judgement that the POP+filters case is critical. A download session with filters active can access nearly every folder defined - stressing resource use and leaving the entire mail system vulnerable. We shouldn't remain in such a vulnerable position. IMHO, the logical point at which to do this is when closing the server session.
Updated•22 years ago
|
Whiteboard: [ADT3]
Comment 24•22 years ago
|
||
Discussed in Mail News bug mtg with Engineering QA Mktng PjM. Decided to minus this bug.
Comment 25•22 years ago
|
||
has the approved patch landed? if so can you obsolete that patch so it doesn't look like it's waiting to land? thanks.
Assignee | ||
Comment 26•22 years ago
|
||
Comment on attachment 73221 [details] [diff] [review] new patch for local mail incorporating sr comments obsoleting (because it's checked in)
Attachment #73221 -
Attachment is obsolete: true
Assignee | ||
Comment 27•22 years ago
|
||
leaving open for the pop3 filter case.
Updated•21 years ago
|
Summary: Request MSF files be closed when not in use → Request MSF files be closed when not in use (pop3 filter only!)
Comment 28•21 years ago
|
||
Are the db files closed on profile switch? David, could you check if you can help closing some more files as needed for bug 205821 ?
Assignee | ||
Comment 29•21 years ago
|
||
it doesn't look like the db files are closed on profile switch but I doubt that has anything to do with bug 205821 because we're not using the db files after the profile is switched. It's not good to leave them open, but it's not going to cause any actual harm that I can see besides some memory bloat. Both cases of .msf files left open should be fixed at some point, though.
Assignee | ||
Comment 30•20 years ago
|
||
after getting new pop3 mail, close the db's of any folders that had new mail filtered into them, if the folder is not open in the ui...also cleaned up a little bit the code that marks summary files as valid after copying local folders...
Assignee | ||
Updated•20 years ago
|
Attachment #164015 -
Flags: superreview?(mscott)
Updated•20 years ago
|
Attachment #164015 -
Flags: superreview?(mscott) → superreview+
Assignee | ||
Updated•20 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: nsbeta1- → fixed-aviary1.0
Resolution: --- → FIXED
Assignee | ||
Comment 31•20 years ago
|
||
this breaks new status on messages filtered to local folders, because that is stored in the db, and we're closing the db now. So, we need to store the new set in the folder object, and propagate it to the db when we open the db. Reopening this bug for that fix.
Assignee | ||
Comment 32•20 years ago
|
||
now we save a new set in the folder object, and if we open a folder db, and the folder knows there are new messages, we apply the new set to the db. I need to run with this for a little bit to make sure it doesn't break anything...
Assignee | ||
Updated•20 years ago
|
Attachment #164222 -
Flags: superreview?(mscott)
Assignee | ||
Updated•20 years ago
|
Status: REOPENED → ASSIGNED
Whiteboard: [ADT3]
Updated•20 years ago
|
Attachment #164222 -
Flags: superreview?(mscott) → superreview+
Assignee | ||
Comment 33•20 years ago
|
||
the view code needs to go through code that checks the new set in the db in order for the view code to display the new flag correctly.
Assignee | ||
Updated•20 years ago
|
Attachment #164239 -
Flags: superreview?(mscott)
Updated•20 years ago
|
Attachment #164239 -
Flags: superreview?(mscott) → superreview+
Assignee | ||
Updated•20 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 20 years ago → 20 years ago
Keywords: fixed-aviary1.0
Resolution: --- → FIXED
Comment 34•20 years ago
|
||
There is a problem, that if you download new mail, don't read it, restart Mozilla, the new mail indicators (green arrows on folders) are lost. May your last 3 comments have something to do with this?
Assignee | ||
Comment 35•20 years ago
|
||
re comment 34, that has always been that way since Netscape 4.x. New is defined as "having a new message arrive in the folder during the current app session". Once you shut down, no messages are new anymore.
Reporter | ||
Comment 36•20 years ago
|
||
I'll admit I've never fully adapted to the "Object Oriented" paradigm. Just another dinosaur and all that. However, re: comment#31, et.seq., I find it hard to understand why the "Newness" indicator isn't simply a property ( attribute? ) of the Folder Object -- and the database file completely inside the containment of the Object. But, of course, I think in different languages. Sigh!
Comment 37•20 years ago
|
||
Comment 35: This sounds like that is actually the correct behaviour (loose the flag). Anyway, I wonder if you actually didn't change it now, so that the indicator will preserve across sessions. You took it out of the db file into some folder object storage (maybe panacea.dat), so that it is immediatelly accessible. That's how I understand it. I may be wrong. Comment 36: looks like this is exactly what David did now :) But even an attribute of an 'object' must be stored somewhere physically, and there are problems how to retrieve it from that storage.
Assignee | ||
Comment 38•20 years ago
|
||
right, to be clear, having the new flag not persist across sessions is not a technical issue or limitation of our implementation; it's the way we intended it to work. I didn't change as much as some of the comments have speculated. We've always had a new flag for the folders, and we've always stored the new set non-persistently in the db object. All I've done is add a non-persistent new set in the folder object that is then copied to the db's non-peristent set. I may have introduced a regression in the new flag handling, but I don't think it's one that will span sessions.
Reporter | ||
Comment 39•20 years ago
|
||
re: Comment#36, Comment#37: Well, of course it needs be somewhere. Point is, only the code that realizes the object needs know where and how. I don't know much about panacea (except it isn't one), but anyone outside the folder abstraction that has his fingers on the flag needs to have his fingers cut off.
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•