Closed Bug 533513 Opened 15 years ago Closed 14 years ago

Delete, Undo, Delete does not delete; requires 2nd Delete of message

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(blocking-thunderbird3.0 -)

RESOLVED WORKSFORME
Tracking Status
blocking-thunderbird3.0 --- -

People

(Reporter: mike, Assigned: Bienvenu)

References

Details

(Keywords: regression, Whiteboard: dupme?)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091208 Shredder/3.0.1pre

Delete an IMAP mail message and then undo. This returns the message. Yet, if you then Delete the message again, it goes away temporarily, but the immediately returns. It requires a second Delete to remove the message. 

Reproducible: Always

Steps to Reproduce:
1. Delete an IMAP mail message.
2. Undo.
3. Delete the message again.
4. note that message disappears, and then returns.
5. Delete again to force the issue.
Actual Results:  
Delete must be used twice to redo a message delete.

Expected Results:  
message deletion should occur correctly each time.
yeah, I've seen this and something similar.
a variation is something like drag move, unmove, drag move it somewhere else.
so undo is being weird.
Will provide clearer steps later.

(might be a dupe but taking the quick path and confirming)
Status: UNCONFIRMED → NEW
Component: General → Folder and Message Lists
Ever confirmed: true
Keywords: regression
QA Contact: general → folders-message-lists
Version: unspecified → 3.0
(In reply to comment #0)
> Steps to Reproduce:
> 1. Delete an IMAP mail message.
> 2. Undo.
> 3. Delete the message again.
> 4. note that message disappears, and then returns.
> 5. Delete again to force the issue.

Which IMAP delete model do you use?
  Move to trash? Mark as deleted? Remove immediately?
Do you enable IDLE command use?

Anyway, get IMAP log with timestamp, and check IMAP level flow first.
> timestamp : See Bug 402793 Comment 17
> IMAP log  : https://wiki.mozilla.org/MailNews:Logging
"Order Received" column value of IMAP folder is UID of mail. Show the "Order Received" column, and write down UID of mail you deleted and UID of mail disappeared/reappeared by your operation, please.
Mine is move to trash, and not gmail. IDLE is enabled

message in inbox with UID-1.
drag to folder X.
when I undo, message appears in inbox with original UID-1.
when I delete undone message, UID-1 is gone and msg appears in inbox with a new UID-2
For me:

*) gmail not involved
*) Move to Trash model
*) IDLE command used
*) UID
   - 451531: before delete
   - 451531: after delete/undo
   - 451532: after second delete (when it magically re-appears)

It appears that thunderbird for the nightly builds (of 3.0.1pre) is linked to nsprd4.dll, but, I don't get a log file created when running tb via .bat file:

set NSPR_LOG_MODULES="imap:5,timestamp"
set NSPR_LOG_FILE="C:\imap.log"
"C:\Program Files (x86)\Shredder\thunderbird.exe"
can y0ou find a 1-2 day regression range? 
 http://www.rumblingedge.com/2009/02/24/howto-find-regression-windows-through-manual-binary-search/
that would hit the nail on the head of finding the cause
Looks look the 11-7 nightly was the first build to show the problem:

ftp.mozilla.org/pub/thunderbird/nightly/2009/

2009-10-15-03-comm-1.9.1	NO
2009-10-24-03-comm-1.9.1	NO
2009-10-31-03-comm-1.9.1	NO
2009-11-04-03-comm-1.9.1	NO
2009-11-06-03-comm-1.9.1	NO
2009-11-07-03-comm-1.9.1	YES
2009-11-08-03-comm-1.9.1	YES
2009-11-15-03-comm-1.9.1	YES
2009-11-08-03-comm-1.9.1	YES
Thanks MrC for finding the regression range!

notable checkins on 11-06 are
* speed up imap move/copies of large numbers of messages, r/sr=standard8,  bug 525646
* Gloda correctness fix.  Nominally tracked by Bug 465618 - gloda deleted message processing logic is not purging messages. r+sr=bienvenu, a=blocking-thunderbird3.
* Bug 465618 - Fix massive oversight in PendingCommitTracker goals. rs=dmose
> set NSPR_LOG_FILE="C:\imap.log"

On some systems C:\ is protected, you need to choose another directory to write your log file to.
Blocks: 465618
Thanks.  I had first tried writing the log to the same file name in my Desktop folder.  That also failed.
(In reply to comment #4)
Remove excess double-quote from parameter value in next 2 set commands.
  set NSPR_LOG_MODULES="imap:5,timestamp" => imap:5,timestamp
  set NSPR_LOG_FILE="C:\imap.log"         => C:\imap.log
(In reply to comment #4)
> *) UID
>    - 451531: before delete
>    - 451531: after delete/undo
>    - 451532: after second delete (when it magically re-appears)

It looks next.
 1. Delete of uid=451531
    Inbox: copy 451531 to Trash (copied to uid=xxx)
           store \Deleted to 451531 
 2. Undelete(uid=451531)
    Inbox: remove \Deleted from 451531 => displayed again
    Trash: copy xxx to Inbox => copied to uid=451532, not displayed yet 
           store \Deleted to xxx
 3. Immediately, or sooner or later, uid=451532 is displayed at Inbox
(In reply to comment #10)
> (In reply to comment #4)
> Remove excess double-quote from parameter value in next 2 set commands.
>   set NSPR_LOG_MODULES="imap:5,timestamp" => imap:5,timestamp
>   set NSPR_LOG_FILE="C:\imap.log"         => C:\imap.log

I believe the command shell strips the double quotes, superfluous or not.  Tbird never sees them.

The double quotes were necessary when using the full path to the imap log when on my Desktop (since my username contains a space).
(Off-Topic)

(In reply to comment #12)
> I believe the command shell strips the double quotes, superfluous or not. 
> Tbird never sees them.
> The double quotes were necessary when using the full path to the imap log when
> on my Desktop (since my username contains a space).

Whole NSPR_LOG_xxx=...(till end of command line) is a parameter of SET command, and SET command puts whole ...(till end of command line) including spaces in environment variable named NSPR_LOG_xxx. Tb uses string saved in the environment variable.
Check by next at command prompt, please.
  SET abc=xxx   yyy   zzz   
  SET abc
  ECHO %abc%?
  SET abc=
String saved in environment variable named NSPR_LOG_MODULES should be imap:5,timestamp. It shouldn't be "imap:5,timestamp".
Please don't confuse with required double-quote in COPY "a b c.txt" "d e f.txt" etc. In this case, #a b c.txt#(no #) is positional parameter #1(source) and #d e f.txt#(no #) is positional parameter #2(target) of COPY command, they are quoted by two double-quote's.
Thanks WADA... I was being daft.  I had both misunderstood the SET command + cmd interpreter, and failed to notice I had a leading \ in front of my C: (eg. \C:\blah\blah\blah.

I have a log now, if it is of value.  Let me know what sections to look for to share, if log is necessary, as there is stuff I'd prefer to remain confidential.  Since the bug is so easily reproducible, I suppose my logs are nothing unique.

Thanks again.
(In reply to comment #14)
> Let me know what sections to look for to share, if log is necessary,
> as there is stuff I'd prefer to remain confidential.

Required log is from "delete of uid=451531(copy to Trash, then delete at Inbox, followed by undelete)" to "final delete of uid=451532 at Inbox". (uid varies.)
  From : At Inbox: uid copy 451531 Trash
         uid store 451531 Flag \Seen may be first one.
  To:  : At Inbox: uid store 451532 Flag \Deleted
Because two folders(Inbox, Trash), uid of mails in Inbox/Trash, status of mails(Flag) only is relevant to problem, no other data such as folder name of new product, mail address, mail data, ... is not required. Remove irrelevant log lines, and attach log file, please.
To MrC(bug opener):
See RFC 3501(http://tools.ietf.org/html/rfc3501) for basic IMAP commands and responses, please.
Summary: Delete, Undo, Delete does not delete; requires 2nd Delete → Delete, Undo, Delete does not delete; requires 2nd Delete of message
we know the regression (I think) and so this should be easily fixed.
nominating for 3.1
blocking-thunderbird3.1: --- → ?
Assignee: nobody → bienvenu
blocking-thunderbird3.1: ? → beta1+
blocking-thunderbird3.1: beta1+ → beta2+
Whiteboard: [don't know how long it will take to fix this w/o causing any regressions]
We're resetting the blocking flag for 3.1 on this bug and instead setting the wanted-thunderbird+ flag. We have too many blocking-3.1 bugs, to the point where it doesn't mean much, and managing the list is making it hard to actually work on closing bugs, which helps no one.

Thunderbird 3.1's primary purpose is to allow us to offer a prompted major update to Thunderbird 2 users, to ensure their continued ability to safely use Thunderbird.  Thunderbird 2 is built on an outdated version of Gecko, and our long-term ability to maintain the users' safety for Thunderbird 2 users is limited.

If you think this bug meets the requirements below, please renominate with a detailed explanation of how it meets the following two criteria, and we will reconsider.  To qualify, this bug must either:

a) make the upgrade experience from TB2 very painful for a large number of users

or

b) be a new, reproducible, severe quality issue (eg dataloss, frequent crashes)

Just because this bug doesn't block TB3.1 doesn't mean it can't or won't make the release.  Once they're done with their blockers (if any), we encourage developers to keep working on non-blocking bugs, and to try to land them as early in the cycle as possible, as non-blocking bugs will become increasingly difficult to land in the later stages of the cycle.
blocking-thunderbird3.1: beta2+ → ---
Flags: wanted-thunderbird+
blocking-thunderbird3.0: ? → -
This seems to be fixed in 3.1(.1)
(In reply to comment #22)
> This seems to be fixed in 3.1(.1)

MrC can you confirm ?
I agree, this appears to be fixed.  I can reply-to, forward, move, click off and back onto an undo-deleted email (I think I could only do three of those before 3.1.1).
I'm unable to easily confirm, as I no longer have the IMAP server that was used to report the problem.  I'm now using google apps.

If additional confirmation is needed, I can setup a quick IMAP server and test.
WFM also, since 5-6 weeks I think.  I'm sure this was fixed by something - if someone knows or finds the fixing bug, please revise this bug's resolution. There should be a strong possibility of the fixing bug might also be marked a regression.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [don't know how long it will take to fix this w/o causing any regressions] → dupme?
Resolution: INCOMPLETE → WORKSFORME
Hello,

my problem (537162) that has been marked as a duplicate of this one is definitely NOT solved. It actually is worse now.
Delete 2 messages -> Undo:
This lets the two messages show up in the folder from which they were deleted, but after Thunderbird has updated the data from the IMAP server again, both messages disappear again (instead of just one message before this was "fixed").

I cannot tell which one is the correct problem for dealing with this, but please reopen one of the problems.

Regards,
Daniel Frank
dup to/fixed by bug 571800 fixed in v3.1.1?  bug 525646 is in our regression range, described also in bug 571800 comment 12.  

But I just tried 20100608 v3.1 it WFM. What's wrong with this picture?
You need to log in before you can comment on or make changes to this bug.