Closed Bug 1952463 Opened 9 months ago Closed 5 months ago

Intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | Uncaught exception in test bound test_setup_virtual_folder_and_compact which

Categories

(Thunderbird :: Folder and Message Lists, defect, P5)

Tracking

(thunderbird_esr128 unaffected)

RESOLVED FIXED
142 Branch
Tracking Status
thunderbird_esr128 --- unaffected

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Regression)

Details

(Keywords: intermittent-failure, intermittent-testcase, regression, Whiteboard: [fixed by bug 1959858])

Attachments

(2 files)

Summary: Intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | Uncaught exception in test bound test_setup_virtual_folder_and_compact → Intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | Uncaught exception in test bound test_setup_virtual_folder_and_compact
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Target Milestone: --- → 138 Branch

Pushed by martin@humanoids.be:
https://hg.mozilla.org/comm-central/rev/ebf506b030ac
Fix intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js. r=tobyp

Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED

Didn't help :(
Apparently we get 0x80550005 which is NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE

Assignee: mkmelin+mozilla → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: Intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | Uncaught exception in test bound test_setup_virtual_folder_and_compact → Intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js | Uncaught exception in test bound test_setup_virtual_folder_and_compact which
Status: REOPENED → NEW
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED

Probably it isn't the test that's broken, see for example bug 1952311…

See Also: → 1952311

Since this didn't happen for a long time until 2025-03-07, maybe there is a connection to https://phabricator.services.mozilla.com/D238551.

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

Yep, that definitely seems like the likely culprit.
For reliability reasons the compaction now produces a new database file, which is installed atomically(ish) upon completion.
This means the database object is destroyed and recreated, which means things using that old DB need to switch to the new DB...

There is folder.notifyCompactCompleted() which tells a folder when the compaction happens. We use that to update the standard message view. That notification might also be useful to update whatever is holding onto the old database in this case?

https://searchfox.org/comm-central/search?q=notifyCompact&path=&case=false&regexp=false

Flags: needinfo?(benc)

Since this is an intermittent and relatively rare error, it may simply be caused by a change in timing. I replaced the custom URL listener in the test with a PromiseTestUtils.PromiseUrlListener (like here). While I am not sure this really fixes the failure, it at least speeds up the test considerably. Try run.

By the way, the test itself seems a bit wonky: Saved search do not reload after a compaction happened, only the affected real folders do. The original reason for the test, message selection maintained by the back-end that might break the view, isn't a thing anymore (see bug 536676).

Pushed by toby@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/34ac3805467a
Try to fix intermittent comm/mail/test/browser/folder-display/browser_savedsearchReloadAfterCompact.js. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 9 months ago9 months ago
Resolution: --- → FIXED
Assignee: mkmelin+mozilla → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW
See Also: → 1949609

While bug 1952311 might have had some impact on this, this may very well now be fixed by bug 1959858.

Depends on: 1952311, 1959858
Status: NEW → RESOLVED
Closed: 9 months ago5 months 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

Created:
Updated:
Size: