Closed Bug 359847 Opened 19 years ago Closed 5 years ago

Moving lager number of Messages from one imap folder to another resulted in multiple copies/duplicates

Categories

(Thunderbird :: Folder and Message Lists, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mscott, Unassigned)

Details

Kerz was using version 2 beta 1 (20061106) on the Mac. 1) Ctrl-A on an Imap Inbox folder with 4000 messages in it. 2) Drag the selection to an online Archive folder to move them... Result: Many copies of the same message appeared in the archive folder. Instead of having 4000 messages he had about 40,000 messages. Each message was duplicated about 5-10 times in the archive. The number of dupes weren't consistent between messages.
are these folders on the same server?
Same server. The server is exchange, not sure what version, I can find out if you need it. The only other thing not mentioned is after I did the move, I tried a number of times to go into the folder. Each time I did, it would eventually time out downloading headers. My only guess here is, each time it timed out, it added another copy of the messages it didn't download yet? I can go back to the earliest messages I moved, which I assume would have their headers downloaded first, and there are only 4 or 5 dupes, where the messages I downloaded last have as many as 10-12 dupes, and took 3 or 4 attempts to download headers before I could see them.
When we download headers, we only download headers for messages we don't have in the db. And since we store messages with the UID as a key, and you can only have one message with any given key, we can't get dupes of messages with the same UID. And when you select a folder, we look at the list of messages the server tells us about, and delete local headers for any message that is no longer in the server list of messages. So, it sounds like Exchange is doing something weird. An imap protocol log might tell us something...you only did the move once?
Only did it once. I'm on a mac, let me know if there's somewhere to pull logs from.
ah, the mac...the only way I know to generate protocol logs on the mac is something like this: open a shell export NSPR_LOG_MODULES=IMAP:5 export NSPR_LOG_FILE=imaplog.txt then cd to the Thunderbird directory and run thunderbird from the command line. It should create imaplog.txt in the thunderbird directory - you can copy it away after selecting the archive folder, and we attempt to download messages from it.
Assignee: mscott → nobody
Confirmed as repeatable with the following configuration: OS: Windows XP SP2 + hotfixes Client: Thunderbird 2.0.0.16 AntiVirus: Symantec 10 Mailbox: IMAP Mail server: Courier IMAP 4.3.1 Case 1: User moved 7323 messages from their Inbox to a subfolder. I/O (writes) on the server pegged. IMAP server had to be stopped/restarted - it seems that enough commands were queued up. Quadruplicates were found. Case 2: User created the subfolder and cleanly moved the same 7323 mail messages using Netscape 7.1 Mail client. User then accessed the IMAP mail account via Thunderbird and deleted the subfolder (User has "Move messages to Trash" option selected as the action for message deletion). I/O on server spiked. IMAP server was allowed to run for a long time (multiple hours). Sysadmin got tired of the shenanigans and restarted the IMAP processes after killing Thunderbird on the client's machine. 278 copies of each of the 7323 messages were found.
Additional data point: Thunderbird 2.0.0.14, Windows XP, AVG A/V (email scanning disabled). Attempting to move 800 messages does *not* trigger the bug. Will try to see if there is a magic threshold which triggers the shenanigans.
Test setup: mail folder with 15,794 messages. A subset was selected and then RH-Click -> Move To -> {Empty IMAP Folder} was selected. Results: 2.0.0.14 - Moved the 11,000 messages without an issue, albeit slow. Curious note: Claws Mail indicated that the original mail messages were marked for deletion LONG before the display fully updated on 2.0.0.14 (on the order of minutes). 2.0.0.16 - Created triplicates in the new folder, would likely continue making copies if allowed to run. Never finished marking old messages for deletion. 2.0.0.17 - Created (roughly) triplicates in the new folder, would likely continue making copies if allowed to run. Never marked original messages for deletion.
Under logging (as per https://wiki.mozilla.org/MailNews:Logging) in 2.0.0.17, unable to duplicate bug.
Bug duplicated under Thunderbird 2.0.0.17 on CentOS 5.2
Additional note: All these tests were done on multi-core boxen.
Running:2.0.0.18 (20081105) on Win XP with all latest service packs today. Server: Communigate Pro 5.2.10 Moving messages creates duplicates when "the move" takes more than X (unknown) number of seconds, the status window flickers and it "restates" that messages are being moved. Last test: attempted to move approximately 300 mails from "INBOX" archive folder on the same server/same account. Resulted in 15964 messages.
Additional note: the "moved" messages were never removed from Inbox, and I manually interrupted the operation by shutting down thunderbird. Moving up to approximately 150 emails work fine.
2.0.19 under Vista (64bit) seems OK.
Confirmed as repeatable with the following configuration (see comment #6, similar): Windows XP Home Edition SP 3 Client: Thunderbird. 2.0.0.22 Antivirus: Antivir, Comodo Free Firewall Mailbox: IMAP When moving emails from main folder to newly created "archive" folder quadruple copies exist. Applicable to all emails in folder irrespective of order. Inet provider states that issue is bug with Thunderbird not server-side.
Addition to comment #15: Mail server: Dovecot 1.0.15
I also can confirm this bug. Reproduced moving about 40k messages form INBOX to a subfolder. Messages duplicated about 3 times. TB 2.0.0.24 on Mac OS X 10.4.11 with a courier-imap server 3.0.8
Component: Mail Window Front End → Folder and Message Lists
QA Contact: front-end → folders-message-lists
Summary: Moving Messages from one imap folder to another resulted in multiple copies → Moving lager number of Messages from one imap folder to another resulted in multiple copies/duplicates

Marcel reported a couple years ago "no, I haven't seen this bug again since then. [comment 16]"

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.