Closed Bug 1792071 Opened 2 years ago Closed 2 years ago

"Another Operation is using the folder" error message never stops - console error "Type error: db.folder is null" from MsgDBCacheManager.jsm

Categories

(MailNews Core :: Database, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102+ fixed)

RESOLVED FIXED
109 Branch
Tracking Status
thunderbird_esr102 + fixed

People

(Reporter: dg, Assigned: mkmelin)

References

Details

Attachments

(3 files)

Attached image thunderbird_cr.jpg

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

Using 102.3.0 on Win7.

I tried to move an email from one folder to another. You only find there is a problem when you try to move an email.

Thunderbird keeps working ok otherwise.

I have tried compacting and removing duplicates but the error persists. The only fix is to restart Thunderbird.

Actual results:

You get a message: "The operation failed because another operation is using the folder. Please wait for that operation to finish and then try again."

You can wait forever as the error persists.

Expected results:

The email should have been moved between folders.

Agent string: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0

Summary: Another Operation using a folder error message never stops. → "Another Operation is using the folder" error message never stops.

@David

Is this from an IMAP folder to an IMAP folder? Is this from an IMAP folder to one within Local Folders? Is this a network share folder by chance? Need some more info please.

Here's something you can do to shed some light on the issue.

  1. With TB running do a ctrl-shift-j to open Error Console
  2. In Error Console, click the garbage can at top left to clear the screen
  3. Go back to TB and try to do the action that causes TB give you this error message. Don't close the error message once it appears
  4. Go back to the Error Console and look for any errors in red and if you find one, post it here. It might hold a clue as to what's happening
Flags: needinfo?(dg)

No, it is ordinary email folders, I do not use IMAP.

At this time all is ok but I will carry out the error console activity as often as possible in the hope of catching something useful for you and then report it here.

Flags: needinfo?(dg)
See Also: → 1776728, 1772832, 1110577

We have a tad too many of similar bugs in this corner as listed in See Also (Bug 1776728, Bug 1772832, Bug 1110577), and a console error which shouldn't be there:
Type error: db.folder is null - MsgDBCacheManager.jsm:133:11
Tentatively raising to S2.

(In reply to David Goadby from comment #3)

No, it is ordinary email folders, I do not use IMAP.

Hey David, it's not clear what you mean with "ordinary email folders". Every email account that you set up with Thunderbird is either IMAP or POP. So if you are getting new messages in Thunderbird, you are using either one of these account types. Can you please check?
≡ > Account Settings > yours@example.com > Server Settings > Server Type:

  • What's the account type of the source folder (where you copy from)?
  • What's the name of the source folder (Inbox/etc. if not private)?
  • Where is the target folder (where you copy to)?
    • Subfolder of the same account which has the source folder?
    • Folder of another email account (which type?)?
    • A folder in the Local Folders hierarchy at the bottom of your folder list?

At this time all is ok but I will carry out the error console activity as often as possible in the hope of catching something useful for you and then report it here.

Thanks for error console screenshot, that's helpful.

Severity: -- → S2
Component: Untriaged → Database
Product: Thunderbird → MailNews Core
Summary: "Another Operation is using the folder" error message never stops. → "Another Operation is using the folder" error message never stops - console error "Type error: db.folder is null" from MsgDBCacheManager.jsm

Oops, forgot to needinfo reporter. Let's try that again - sorry for the noise.

(In reply to David Goadby from comment #3)

No, it is ordinary email folders, I do not use IMAP.

Hey David, it's not clear what you mean with "ordinary email folders". Every email account that you set up with Thunderbird is either IMAP or POP. So if you are getting new messages in Thunderbird, you are using either one of these account types. Can you please check?
≡ > Account Settings > yours@example.com > Server Settings > Server Type:

  • What's the account type of the source folder (where you copy from)?
  • What's the name of the source folder (Inbox/etc. if not private)?
  • Where is the target folder (where you copy to)?
    • Subfolder of the same account which has the source folder?
    • Folder of another email account (which type?)?
    • A folder in the Local Folders hierarchy at the bottom of your folder list?

At this time all is ok but I will carry out the error console activity as often as possible in the hope of catching something useful for you and then report it here.

Thanks for error console screenshot, that's helpful.

Flags: needinfo?(dg)

https://searchfox.org/comm-central/rev/7dc1d988bd7d6203e911778eccd2de8c70a64a23/mailnews/base/src/MsgDBCacheManager.jsm#132 - but that db.folder is null is strange. Comments suggest that can happen through OpenMailDBFromFile

(In reply to Magnus Melin [:mkmelin] from comment #7)

https://searchfox.org/comm-central/rev/7dc1d988bd7d6203e911778eccd2de8c70a64a23/mailnews/base/src/MsgDBCacheManager.jsm#132 - but that db.folder is null is strange. Comments suggest that can happen through OpenMailDBFromFile

Ben, does this factor into any of your findings?

Flags: needinfo?(benc)

(In reply to Wayne Mery (:wsmwk) from comment #8)

(In reply to Magnus Melin [:mkmelin] from comment #7)

https://searchfox.org/comm-central/rev/7dc1d988bd7d6203e911778eccd2de8c70a64a23/mailnews/base/src/MsgDBCacheManager.jsm#132 - but that db.folder is null is strange. Comments suggest that can happen through OpenMailDBFromFile

Ben, does this factor into any of your findings?

Hmmm... afraid it doesn't ring any bells.
But it doesn't surprise me that failed attempts to copy/move messages leave things in an odd state. The error handling in the message copy/move code is very shaky indeed, but the code is so complex and twisty-turny that I don't think there's any way to be confident about fixing the error handling as it stands.
To get some rock-solid error handling and cleanup in there, a proper refactoring is really needed. When it comes down to it, it shouldn't be a massively complex operation, but at the moment everything is intertwined: message copying, header parsing, undo support, move/copy/delete/move-to-trash etc etc...

I did sit down and trace through what happens when you copy a message into a local folder - see https://bugzilla.mozilla.org/show_bug.cgi?id=1731177#c4. It gets pretty convoluted, and that's a simplified version of just one (easy!) case.

Flags: needinfo?(benc)

Reporter, see comment 6. And Does the problem reproduce after Help > troubleshoot mode?

Note Windows 7 is almost two years out of support - time to upgrade. :) (unless you are running it to support users on antiquated OS)

Whiteboard: [closeme 2022-12-15]

(In reply to Wayne Mery (:wsmwk) from comment #10)

Note Windows 7 is almost two years out of support

Not quite, it is on ESR till Jan 2023, and it is not clear if there would be an extension, or not

(In reply to Phoenix from comment #11)

(In reply to Wayne Mery (:wsmwk) from comment #10)

Note Windows 7 is almost two years out of support

Not quite, it is on ESR till Jan 2023, and it is not clear if there would be an extension, or not

What I mean, is that Microsoft has stopped supporting it.

(In reply to Phoenix from comment #11)

(In reply to Wayne Mery (:wsmwk) from comment #10)

Note Windows 7 is almost two years out of support

Not quite, it is on ESR till Jan 2023, and it is not clear if there would be an extension, or not

Paid "extended support" for Win 7 is not offered to average consumers. For all intents and purposes, vanilla "consumer" support ended almost 2 years ago as Wayne said. Time to move on.

(In reply to Wayne Mery (:wsmwk) from comment #12)

(In reply to Phoenix from comment #11)

(In reply to Wayne Mery (:wsmwk) from comment #10)

Note Windows 7 is almost two years out of support

Not quite, it is on ESR till Jan 2023, and it is not clear if there would be an extension, or not

What I mean, is that Microsoft has stopped supporting it.

Nope )
https://support.microsoft.com/en-us/topic/november-8-2022-kb5020000-monthly-rollup-e0044ab3-5798-4622-973f-149e662d8b6e

(In reply to Arthur K. (he/him) from comment #13)

Time to move on.

Not really )

Again, this is not correct: https://learn.microsoft.com/en-us/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq

Note that in the link you provided above is clearly states: "Windows 7 Enterprise ESU Windows 7 Professional ESU Windows 7 Ultimate ESU." This is ONLY for ESU customers paying for ESU updates on Pro or Enterprise.

(In reply to Arthur K. (he/him) from comment #15)

Again, this is not correct: https://learn.microsoft.com/en-us/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq

Note that in the link you provided above is clearly states: "Windows 7 Enterprise ESU Windows 7 Professional ESU Windows 7 Ultimate ESU." This is ONLY for ESU customers paying for ESU updates on Pro or Enterprise.

So from your point of view those are not Windows 7, but something else, right? ;)
PS: in Azure Win 7 ESU are free for virtual desktops, for example ;)

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Unclear if fixing this error will fix the original problem. I guess we'll find out.

Flags: needinfo?(dg)
Whiteboard: [closeme 2022-12-15]
Target Milestone: --- → 109 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0584b41a135e
Avoid "Type error: db.folder is null" in MsgDBCacheManager checkCachedDBs(). r=benc

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9306778 [details]
Bug 1792071 - Avoid "Type error: db.folder is null" in MsgDBCacheManager checkCachedDBs(). r=benc

[Approval Request Comment]
User impact if declined: Unclear when this fix applies. It may be help for some cases where a null folder will mess up other operations.
Testing completed (on c-c, etc.): beta
Risk to taking this patch (and alternatives if risky): safe

Attachment #9306778 - Flags: approval-comm-esr102?

Comment on attachment 9306778 [details]
Bug 1792071 - Avoid "Type error: db.folder is null" in MsgDBCacheManager checkCachedDBs(). r=benc

[Triage Comment]
Approved for esr102

Attachment #9306778 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: