Closed Bug 1952503 Opened 1 year ago Closed 1 year ago

Intermittent comm/mailnews/local/test/unit/test_over4GBMailboxes.js | xpcshell return code: 0 (Unexpected exception 2152857614)

Categories

(MailNews Core :: Backend, defect, P5)

defect

Tracking

(thunderbird_esr128 unaffected, thunderbird136 unaffected, thunderbird137 affected)

RESOLVED FIXED
142 Branch
Tracking Status
thunderbird_esr128 --- unaffected
thunderbird136 --- unaffected
thunderbird137 --- affected

People

(Reporter: intermittent-bug-filer, Assigned: benc)

References

(Regression)

Details

(4 keywords, Whiteboard: [fixed by bug 1959858])

Attachments

(1 file)

https://treeherder.mozilla.org/logviewer?job_id=500208516&repo=comm-central&lineNumber=5133-5134

[task 2025-03-21T03:12:22.116Z] 03:12:22     INFO -  Unexpected exception Component returned failure code: 0x80550005 [nsIMsgLocalMailFolder.getDatabaseWOReparse]
[task 2025-03-21T03:12:22.116Z] 03:12:22     INFO -  compactUnder4GiB@/builds/worker/workspace/build/tests/xpcshell/tests/comm/mailnews/local/test/unit/test_over4GBMailboxes.js:450:10

Tentatively marking this a regression from bug 1925117, which is a bit worrying.
Ben, any ideas? The 0x80550005 is NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE.

Flags: needinfo?(benc)
Keywords: regression
Regressed by: 1925117

My guess is that it's failing on this line, immediately after the compact:

Assert.ok(gInbox.msgDatabase.summaryValid);

https://searchfox.org/comm-central/rev/bcacae34b10c1bc8ade08a3eecbb943af0209a07/mailnews/local/test/unit/test_over4GBMailboxes.js#477

My guess would be that it's failing in nsMsgLocalMailFolder::GetMsgDatabase(),
which calls nsMsgLocalMailFolder::GetDatabaseWOReparse(),
which calls nsMsgLocalMailFolder::OpenDatabase(),
which calls nsMsgDBService::OpenFolderDB()...

There's a potentially relevant note I left here about OpenFolderDB() returning NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE...
https://searchfox.org/comm-central/source/mailnews/base/src/FolderCompactor.cpp#683

The nsMsgDBService has a ropey-looking db cache. Databases remove themselves from that cache when they are destroyed, but maybe in this case the test is holding the old database open (maybe via a car containing a nsIMsgDBHdr?), meaning the compaction doesn't destroy the old database, and GetMsgDatabase() call retrieves the old cached one?

Flags: needinfo?(benc)
See Also: → 1952463

This already happened when part 2 of bug 1925117 was checked in, with error 0x8052000E (2152857614), that's NS_ERROR_FILE_IS_LOCKED, see https://treeherder.mozilla.org/logviewer?job_id=497569832&repo=comm-central&lineNumber=4245 from Windows 11 x64 22H2 CCov WebRender opt X7.

Assignee: nobody → benc
Status: NEW → ASSIGNED

Doh. My comment 5 analysis was looking at the NS_ERROR_FILE_IS_LOCKED crash (although I got confused and was looking for places in that path that threw NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE).

I think the NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE is a different crash signature?

All the crash signatures so far seem to be in TSAN and CCOV builds, with optimisations on, for windows and linux.

In any case, it's pretty intermittent, and I haven't been able to repeat it locally.
I think the thing is to just keep adding instrumentation to drill down using the treeherder logs, and help us figure out what's happening.

First step: figuring out exactly which call in the test is failing.

Just had a failure which was definitely GetDatabaseWOReparse() returning NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE, more-or-less immediately after a compaction (in the previous subtest).
https://firefoxci.taskcluster-artifacts.net/MZtfaYF5Rz2TtUlLSiCTUQ/0/public/logs/live_backing.log

Target Milestone: --- → 138 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/806cb411d480
Add trace output to test_over4GBMailboxes.js to help find intermittent failures. r=tobyp

Might be fixed by bug 1959858.

Depends on: 1959858
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1959858]
Target Milestone: 138 Branch → 142 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: