Open Bug 725555 Opened 12 years ago Updated 2 years ago

If the path to the profile contains a number sign (#), the "Repair folder" command permanently fails to correctly reparse/read the repaired mbox file

Categories

(MailNews Core :: Backend, defect)

defect

Tracking

(Not tracked)

People

(Reporter: blaise, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss)

User Agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.229 Version/11.60

Steps to reproduce:

1. Create a directory with the # symbol in the path: C:\tbprofile#2
2. Start Thunderbird with that profile: Thunderbird.exe -profile C:\tbprofile#2
3. Create a "Blogs & News Feeds" account.
4. Subscribe to any feed.
5. Try to "Repair folder" on the newly created RSS folder.


Actual results:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIMsgFolder.updateFolder]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: rebuildSummary :: line 2141"  data: no]
The folder is now permanently corrupted.

Sometimes RSS folders became corrupted in the same manner all by themselves, upon the first click on them after starting Thunderbird.
At least with TB 9.1 I have also seen
Error: uncaught exception: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIMsgFolder.updateFolder]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: rebuildSummary :: line 2137"  data: no]

While this bug can be reproduced with 3.1.15, I have never encountered the spontaneous corruption described above with it or with versions older than 6(?).0.
I could observe same exception in Tb 9.0.1 on Win-XP, with new Tb profile named #XYZ#, with an RSS feed access only, and "Repair Folder" of the RSS feed.
Confirming.

After a while, many following message(Information) by Gloda were shown in Error Console, because Gloda was enabled by default in new Tb profile. 
> 2012-02-09 19:21:56 gloda.index_msg ERROR Exception while attempting to mark message with gloda state afterdb commit
> [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)
> [nsIMsgDBHdr.getUint32Property]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"
> location: "JS frame :: resource:///modules/gloda/index_msg.js :: PendingCommitTracker_commitCallback :: line 179"  data: no]

Folder URL seen in session.json = "mailbox://nobody@Feeds/%E3 ... %8B" (because Japanese RSS feed, name is in UTF-8 and is escaped in mailbox: URL).
Phenomenon like next?
 nobody@Feeds part is replaced by directory-rel([ProfD]Mail/Feeds).
 [ProfD] is replaced by profile directory path with "/" as delimiter because URL.
 because "#" is delimiter of hash in URL, Tb confuses.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Folder and Message Lists → Backend
Product: Thunderbird → MailNews Core
QA Contact: folders-message-lists → backend
This happens on any local folder, not just feeds.  The utf8 problem reading session.json has been fixed (you'll notice jp quickfilter text is restored correctly now), and isn't relevant here imo.

Without reading the reparse code, the following occurs: a new folder 'Test' in a #XYZ# profile, in Local Folders, can be created and have a message copied to it.  On restart, it works.  On closing Tb, deleting the Test.msf and restarting, the rebuild of the Test.msf fails to read the 'Test' file.

The file itself does not seem corrupted at all when compared to prior to restart (no change in line feeds or such) as a diff show no...diff.  Bizarre, as nothing (like deleting panacea.dat) will make Tb parse the 'Test' file correctly and recover.
Keywords: dataloss
OS: Windows 7 → All
Hardware: x86 → All
Summary: If the path to the profile contains a number sign (#), the "Repair folder" command corrupts RSS folders → If the path to the profile contains a number sign (#), the "Repair folder" command permanently fails to correctly reparse/read the repaired mbox file
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.