Closed Bug 644601 Opened 14 years ago Closed 13 years ago

Cannot archive mail on my mac

Categories

(MailNews Core :: Backend, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-thunderbird5.0 needed, thunderbird5.0 wanted)

RESOLVED FIXED
Thunderbird 5.0b1
Tracking Status
blocking-thunderbird5.0 --- needed
thunderbird5.0 --- wanted

People

(Reporter: armenzg, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

When I try to archive I get this: Error: An error occurred executing the cmd_archive command: [Exception... "Component returned failure code: 0x80550008 [nsIMsgCopyService.CopyMessages]" nsresult: "0x80550008 (<unknown>)" location: "JS frame :: chrome://messenger/content/mailWindowOverlay.js :: BatchMessageMover_processNextBatch :: line 1508" data: no] Source File: chrome://global/content/globalOverlay.js Line: 75
What build are you using, and if you're using a 3.3 build, are you using Thunderbird Conversations add-on, and if so, does the problem go away if you disable conversations?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b13pre) Gecko/20110322 Thunderbird/3.3a4pre I have no addons.
just fyi, me 2.
Armen: the workaround for me was to go into my TB profile directory, in ImapMail, in mail.mozilla.com, in Archives.sbd, and rename 2011.msf, which is the index file for the 2011 archive folder. That causes a new msf file to be created, and then it works. Bienvenu's on it to fix it.
The work around works for me. Thanks!
the issue is that the .msf file thinks the highwater mark for the folder is 0xfffffffe, which means we don't have room for our fake headers when doing an offline move. This might have been caused by archiving one of the offline fake fcc headers back when those could end up in a view w/o getting replaced by the real header. So we need to protect against that happening, and figure out a work-around if it has happened...
I think there's good chances this will happen with Thunderbird Conversations, and its "Send & Archive" feature. It will archive the message sent by setting the .fcc property of the composition fields so that the sent message goes directly into the archive folder...
marking blocking 3.3
blocking-thunderbird5.0: --- → needed
Attached patch wip to repair and prevent this (obsolete) (deleted) — Splinter Review
this doesn't fix the issue (unless you select the particular archive folder that has the issue) but it's a step along the way.
Assignee: nobody → bienvenu
one way of reproducing this is the following: Using Conversations Addon, Send and archive a message Archive 127 messages or so to the same archive folder destination Subsequent archives to the same dest will fail. With the attached patch, selecting the archive folder will clear things up for a while. The main problem is that the fake headers we hand out for fcc'ing a folder start at 0xffffff80, which makes our highwater mark become 0xffffff80, and we quickly run out of room. Selecting the folder causes us to get rid of the fake headers, and the attached patch makes us recalculate the highwater mark. But that still leaves the underlying issue. I've been trying to make the fake headers not affect the highwater mark, but that had issues w/ contention over msg keys. I could make the nsImapMailFolder::CopyMessagesOffline code that looks for a starting fake UID based on the highwater mark fallback to looking for an available range of free UID's.
davida - I've generated a try server build with the approach described in the last parargraph above. I'll let you know if it succeds... http://ftp.mozilla.org/pub/mozilla.org/thunderbird/tryserver-builds/bienvenu@nventure.com-08321330ff6d
Attached patch patch in try server build. (obsolete) (deleted) — Splinter Review
Attachment #524398 - Attachment is obsolete: true
Attached patch fix with unit test (deleted) — Splinter Review
this adds a unit test that we both handle and repair extremely high highwater marks.
Attachment #527172 - Attachment is obsolete: true
Attachment #527421 - Flags: review?(bugzilla)
Whiteboard: [has patch for review]
Comment on attachment 527421 [details] [diff] [review] fix with unit test Review of attachment 527421 [details] [diff] [review]: ::: mailnews/db/msgdb/src/nsDBFolderInfo.cpp @@ +498,5 @@ + PRBool hasMore = PR_FALSE; + nsCOMPtr<nsIMsgDBHdr> pHeader; + nsMsgKey recalculatedHighWater = 1; + PRInt32 i = 0; + while(i++ < 100 && NS_SUCCEEDED(rv = hdrs->HasMoreElements(&hasMore)) So is this just looking at the latest 100 messages, or looking at the high water key of headers? If its the high water mark then, I'd have expected something sightly bigger (e.g. 128/256). Can you a comment just to indicate which it is? @@ +501,5 @@ + PRInt32 i = 0; + while(i++ < 100 && NS_SUCCEEDED(rv = hdrs->HasMoreElements(&hasMore)) + && hasMore) + { + rv = hdrs->GetNext(getter_AddRefs(pHeader)); Nit: rv isn't being used here, so might as well drop it. ::: mailnews/imap/test/unit/test_imapHighWater.js @@ +68,5 @@ + gIMAPIncomingServer.maximumConnectionsNumber = 1; + + // We need an identity so that updateFolder doesn't fail + let acctMgr = Cc["@mozilla.org/messenger/account-manager;1"] + .getService(Ci.nsIMsgAccountManager); nit: the indent is wrong, but you can just use MailServices.accounts anyway. @@ +103,5 @@ + let messages = []; + messages = messages.concat(scenarioFactory.directReply(10)); + + // Add 10 messages with uids 1-10. + let imapInbox = gIMAPDaemon.getMailbox("INBOX") nit: unnecessary double space
Attachment #527421 - Flags: review?(mbanner) → review+
Assignee: dbienvenu → nobody
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [has patch for review]
Target Milestone: --- → Thunderbird 3.3a4
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: