Closed Bug 381867 Opened 17 years ago Closed 14 years ago

Infinite loop when copying/moving messages to IMAP folder

Categories

(Thunderbird :: General, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: contact.mozilla, Assigned: Bienvenu)

Details

(Whiteboard: closeme 2010-02-20)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11
Build Identifier: version 2.0.0.0 (20070326)

Copying messages in an IMAP folder results in endless loop. The message IS copied in each loop.

This happens in all of these usecases:
* sending mail with an option to place a copy in the Sent folder on the server manually
* moving/copying a message (drag&drop, menu command, keyboard shortcuts)

This does not happen in the following usecases:
* moving message between imap folders on the same server

Following parameters and settings do not seem affecting the bug:
* check for new mail enabled for the folder
* name of the folder
* size of the message
* installed extensions

Versions affected:
* Thunderbird with specified version
* Last downloadable binaries for the SeaMonkey suite
* Thunderbird 1.* with latest automatic upgrades

Reproducible: Always

Steps to Reproduce:
1. Open the imap folder, empty it and purge it to obtain the initial conditions.
2. Open a local folder containing a test message.
3. Copy the message from the local folder to the imap folder (mouse, keyboard or menu commands).
4. Wait more then 30 seconds (less if fast connection).
5. Pres ESC to cancel the loop copying the same message to the imap folder.
6. Open the imap folder to check whether the message was copied.
Actual Results:  
The message has been copied several times.
After step 4, network analysis and the status bar show that an endless loop is performed.

Expected Results:  
The message is copied only once and the mail client does stop activity after performing it.

It is possible that the endless loop results from not handled imap response specific the my server. For that, send me a mail to obtain connection settings to an imap account on that server to reproduce the bug for sure.
Sure, you can either send me the account info, or try generating an imap protocol log and attaching/e-mailing me that, by following these instructions, and substituting IMAP for protocol.

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
Version: unspecified → 2.0
This log shows, that after sending the data to the IMAP server, the connection is reset. Thunderbird then tries indefinitely to resend the data.
If the connection is reset by an external agent (virus checker, firewall), there is still the proposition to limit the number of retries. Therefore I reduce the severity of the bug without closing it.

For information, when using a secure connection to the IMAP server, the problem is no more. It is compatible with the hypothesis that a virus checker does reset the connection as far as virus checkers cannot intercept the secure connections.
Severity: major → minor
Hello,

I am using Win XP and Thunderbird 2.0.0.6. We have an Open BSD IMAP server.
When I move messages from Any folder to any other folder, sometimes it works.  More often:
a)Thunderbird churns ( bar goes up and down, little wheel goes round) and nothing appears to happen
OR
b)nothing appears to happen, Thunderbird appears to hang.

In reality, what happens:
Multiple copies of the message(s) I am trying to move appear in the folder I am trying to move them to.The message in the original folder appears to not move; it stays there and looks like it has not moved.
( If the messages  I am moving are already marked as "read" I have no way of seeing them appear in the new folder)

If I change my view to a different folder, SOMETIMES it stops the process. 
i.e SOMETIMES Thunderbird continues to move messages until I close Thunderbird.
If I leave Thunderbird to run, it eventually realises that it has moved the messages.  However, I have counted up to 200 copies of some messages befoore it will stop by itself.

This bug occurs with manual moves (mouse, delete button) and also with Thunderbirds automated moves (Junk mail, filters)

-So the most immediate symptom of this bug is "my junk mail gets marked as junk but does not move" When the reality is that my marked junk mail has been moved and duplicated a number of times, but that Thunderbird does not know it.

More information:
Thunderbird is most likely to work correctly if I am moving only one message
Thunderbird is more likely to work correctly if the message(s) I am moving are the first message(s) I have moved since Thunderbird was opened.
This problem has only appeared in the about the last 3 weeks for me. ( hard to give you an exact date, as mentioned it has taken a while to find it, but I have used Thunderbird for the last 12 months on IMAP.

I am running antivirus software ( AVG), also Skype.  I will try to investigate somemore whether these being on/off make any difference.

My apologies with the vagueness of this report.  I am trying to get some more specific data, but the reality is that this bug is making Thunderbird unusable for me, so I thought I would send a message to tell you what I knew. 
an imap protocol log of a session where this happens might help - substitute IMAP for "protocol" in these instructions:

http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#imap
Hi David, I will have to wait and get some help before I can send you the protocol log.  Meanwhile, Thunderbird is behaving itself this morning, and I still dont know what triggers the behaviour.
Will post something as soon as I have it.
Thunderbird 2.0.0.16 (Windows/20080708)

This bug seems to be affecting many of my work colleagues at Sun Microsystems running Thunderbird on Windows, Solaris and MacOS with varying versions of Thunderbird.

And it's very difficult to track as it only happens every now and then. I just got the problem again today after not seeing it for months. Went to try and diagnose it and it's now gone again!

Symptoms are as described above - first notice when emails which have just been sent fail to copy into the IMAP sent folder. After this, if I manuall try to copy or move an email into the Sent folder (drag from inbox or via move/copy to menus) it fails and hangs while trying to do so.

When whatever is blogging stop blocking, if I check Sent I have 20 or so copies of some emails which have been sent. 

When it happens again, I'll capture an IMAP log and submit here. I think the priority of this bug needs raising.


I haven't been able to catch this happening in the debugger but this patches the problem I see in the code, where we might not grow the line buffer enough to put the whole line in the current buffer.
Assignee: mscott → bienvenu
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 331782 [details] [diff] [review]
possible fix - checked in.

I'd like to catch this in debugger, to verify the fix, and see the retry happen as well.
Attachment #331782 - Attachment is patch: true
David, is patch safe enough to land on trunk?  Do you need Darren's log?
it's safe enough, but I'm utterly unconvinced that it will actually fix the problem...I guess I'll ask for a review, though.
Attachment #331782 - Flags: superreview?(bugzilla)
Attachment #331782 - Flags: review?(bugzilla)
Attachment #331782 - Flags: superreview?(bugzilla)
Attachment #331782 - Flags: superreview+
Attachment #331782 - Flags: review?(bugzilla)
Attachment #331782 - Flags: review+
Comment on attachment 331782 [details] [diff] [review]
possible fix - checked in.

Let's see what happens with this in place.
Attachment #331782 - Attachment description: possible fix → possible fix - checked in.
is problem gone in version 3?
Whiteboard: closeme 2010-02-20
RESOLVED INCOMPLETE due to lack of response to last question. If you feel this change was made in error, please respond with your reasons why.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: