Open Bug 989884 Opened 11 years ago Updated 2 years ago

Gloda index error "Problem encountered during message move/copy: undefined" when move more than one messages to local folder. If "outdated msf condition" exists Gloda should take some action or wait for recovery (rebuild/repair-index)

Categories

(MailNews Core :: Search, defect)

defect

Tracking

(Not tracked)

People

(Reporter: opera.wang, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release) Build ID: 20140123185438 Steps to reproduce: 1. enable gloda 2. select more than 1 messages in IMAP folder 3. move or archive to local folder Actual results: Errors in console like: Error: 2014-03-28 17:40:43 gloda.index_msg ERROR Problem encountered during message move/copy: undefined Source file: resource://app/modules/gloda/log4moz.js Line: 688 2014-03-28 17:40:43 gloda.index_msg ERROR Problem encountered during message move/copy: undefined And if right click the move message and select 'Open Message in Conversation', Error show in console like: Error: Couldn't find a collection for msg: [xpconnect wrapped nsIMsgDBHdr] Source file: chrome://messenger/content/msgHdrViewOverlay.js Line: 2848 Expected results: No error.
Attached image gloda_error.jpg (deleted) —
I debug in the JS code and found the issue is GlodaMsgIndexer._msgFolderListener.msgsMoveCopyCompleted was called with wrong parameters, see attachment. When select 2 messages to move, aSrcMsgHdrs.length is 2(correct) while aDestMsgHdrs.length is 0(seems wrong), this will cause exception in line 2383: let destMsgHdr = aDestMsgHdrs.queryElementAt(iMsg, nsIMsgDBHdr); BTW, the catch & report function @ line 2481 should change also: this.indexer._log.error("Problem encountered during message move/copy:", ex.stack); ex.stack is undefined and won't give much information for this error, eg line number. So this issue is similar to bug 917769, but won't need a filter to trigger. It strange that when select 1 message to move, aSrcMsgHdrs.length == aDestMsgHdrs.length == 1, and the error won't happen.
STR is pretty simple: Emulate power failure between "msgStore file update" and ".msf file update", and invoke mail copy/move before folder is recovered by Rebuild-Index. = Append mail data to Berkley msgStore file manually, then invoke DoCopy process with Gloda enabled When "outdated msf condition" exists in copy/move target folder, copy/move does do same action as this emulation, then generates new/fresh/worse "outdated msf condition", without creating MsgDBHdr for appended mail(because of outdated msf condition, correct creation of MsgDBHdr is impossible). This problem is bug 261419 and bug 495760. It looks that Gloda also goes ahead even though "outdated msf condition" is returned to MsgDatabase open request. If access from JavaScript, "outdated msf condition" is currently returned by "Exception with 0x80550005" upon msgFolder.msgDatabase property access. Before goes ahead to code relevant to this bug's message, Gloda should do something if "outdated msf condition" exists, or should wait for recovery(rebuild-index by someone) if "outdated msf condition" exists.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → major
Summary: Gloda index error when move more than one messages to local folder → Gloda index error "Problem encountered during message move/copy: undefined" when move more than one messages to local folder. If "outdated msf condition" exists Gloda should take some action or wait for recovery (rebuild/repair-index)
Hi, Many errors like this, viewing a message takes very long time, no more auto filtering. Horodatage : 13/03/2017 12:46:47 Erreur : 2017-03-13 12:46:47 gloda.index_msg ERROR Problem encountered during message move/copy: PendingCommitTracker_getGlodaState@resource:///modules/gloda/index_msg.js:236:21 gloda_indexer_msgsMoveCopyCompleted@resource:///modules/gloda/index_msg.js:2429:17 Fichier source : resource:///modules/gloda/log4moz.js Ligne : 691 Microsoft Windows 10.0.14393 Thunderbird 45.8.0 KES 10.2.5.3201 Zimbra 8.6.0_GA_1200 (build 20160606111426) Gilles

Hi,
I experience the same error when archiving my emails (using Ubuntu 19.10 and TH 68.2.2) :

2019-12-30 09:35:18 gloda.index_msg ERROR Problem encountered during message move/copy: msgsMoveCopyCompleted@resource:///modules/gloda/index_msg.js:2557:45
log4moz.js:769
append resource:///modules/gloda/log4moz.js:769
log resource:///modules/gloda/log4moz.js:419
error resource:///modules/gloda/log4moz.js:427
msgsMoveCopyCompleted resource:///modules/gloda/index_msg.js:2671

I rebuilt the index as recommend, deleting global-messages-db.sqlite file : https://support.mozilla.org/en-US/kb/rebuilding-global-database

Then restart archiving (using AutoArchiveReloaded extension)... and again the same error raised several times. This is very annoying as archiving fails and stops unexpectedly.

In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.

Severity: major → --
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: