Deleting of a message while the summary file is being built stops the process



MailNews Core
16 years ago
10 years ago


(Reporter: PrzemyslawTomala, Assigned: Bienvenu)



Windows 98

Firefox Tracking Flags

(Not tracked)



(1 obsolete attachment)



16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.8) Gecko/20020204
BuildID:    2002020406

Sometimes (eg. after a system crash) the summary file gets rebuilt. But if you
delete one of the mail messages appearing during this process, the rebuild
process stops and the rest of mail in the folder which was processed does not
appear anymore. Moreover, the only thing you can do to get a correct summary
file again is stopping Mozilla, deleting the summary file manually and starting
it again to allow it to build a correct summary file. If you choose to compact
the mail folder before you build the correct summary file, the unindexed part of
the folder gets lost forever.

Reproducible: Always
Steps to Reproduce:
1. Delete the summary file for a mail folder manually
2. Start Mozilla mail client and choose to see this folder
3. When the message subject lines start to appear, immediately choose one and
press DEL
4. The indexing process stops
5. Quit Mozilla mail and start it again to see the indexing process  does not
6. Choose "Compact this folder" to see the unindexed part of the folder gets

Actual Results:  Mozilla works ok, but my mail is gone

Expected Results:  I suppose, the summary file rebuild process should not stop
after a message deletion, or a message deletion should not be allowed during the
summary file rebuild process
Severity: normal → critical
Keywords: dataloss

Comment 1

16 years ago
the latter is correct - message deletion should not be allowed during summary
file creation. Technically, message selection shouldn't be allowed either, since
it could cause a message to get marked read causing us to write to the mail
folder while we're reading from it.
Component: Mail Database → Mail Back End
Ever confirmed: true

Comment 2

16 years ago
Navin, this is a classic case of the code taking an invalid db and marking it
valid, resulting in data loss.

Comment 3

16 years ago
yeah, all these operations should proceed only after obtaining a folder lock. 
There are some other dups for this bug. 


16 years ago
QA Contact: esther → sheelar

Comment 4

16 years ago
Keywords: nsbeta1

Comment 5

16 years ago
Discussed in 2/27/02 Mail & News bug meeting.  Decisions was to plus this bug as
a P2.
Keywords: nsbeta1 → nsbeta1+
Priority: -- → P2
Target Milestone: --- → mozilla1.0

Comment 6

16 years ago
Summary file rebuild stops also when I press "Get Msgs"while Mozilla is working
on it. I haven't checked whether it can lead to data loss as well. 

Comment 7

16 years ago
ptomala, how is that possible ? I will have to check though. 

Comment 8

16 years ago
Sorry, I cannot reproduce the effect of stopping summary file build with
pressing "Get Msgs" anymore. Maybe it was not the reason - I will try to check
it out more thoroughly and give some more info on this

Comment 9

16 years ago
I was not able to reproduce this - I'm still trying, however.

Comment 10

16 years ago
Can anyone reproduce this problem as described?

Comment 11

16 years ago
The first time it happened, I started Mozilla mail, the 
summary file for my Inbox folder started reconstructing 
and when I pressed "Get Msgs", it stopped. But as I 
have tried many times to reproduce this effect and had 
no success, I'm no more sure that getting new messages had 
anything to do with the erroneous behaviour. Maybe there 
was another reason which I cannot find now. 
Since then I have upgraded Mozilla from 0.9.8 to build 2002022603,
but I suppose the upgrade has nothing to do with this.

Comment 12

16 years ago
oh, upgrading could have everything to do with you not being able to reproduce
this, since Navin fixed some problems in this area.

Comment 13

16 years ago
Reporter, was this happening for every folder, or just the inbox? Do you still
see either of the problems described in this bug?

Comment 14

16 years ago
Created attachment 72857 [details] [diff] [review]
proposed fix

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.
Comment on attachment 72857 [details] [diff] [review]
proposed fix

Attachment #72857 - Flags: superreview+

Comment 16

16 years ago
Comment on attachment 72857 [details] [diff] [review]
proposed fix

whoops, wrong bug.
Attachment #72857 - Attachment is obsolete: true

Comment 17

16 years ago
Stopping summary file rebuild caused by a message removal occured in every
folder I have tried. Stopping after "Get Msgs" (as I have written, I'm no more
sure It really was caused by "GetMsgs") happened only in the inbox.
I checked it out now that I have upgraded Mozilla and cannot reproduce any one
of them using build 2002022603.

Comment 18

16 years ago
So this is works for me with current builds, if I read you correctly. Marking WFM.
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME

Comment 19

16 years ago
marking verified worksforme based on reporter's last comments
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.