Closed Bug 1786252 Opened 3 years ago Closed 1 year ago

IMAP Mailbox stop getting new mail over time (some days)

Categories

(MailNews Core :: Networking: IMAP, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: lemaitre.dulotus, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.105 Safari/537.36

Steps to reproduce:

My OS is MacOS Monterey on a Mac M1.
Open Thunderbird.
Wait for some days.

Actual results:

After some days, some of my IMAP boxes stop synchronizing.
I can still read old mails but Thunderbird does not get new mails for theses mailboxes. When I over the mouse cursor in the mail list of theses mailboxes, cursor has a (forever) loading animation.

Bug gets fixed after restarting Thunderbird, until it happens again.

Expected results:

All boxes should synchronize. No matter how long Thunderbird has been opened.

Perhaps related to Bug 1776823?

Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core

Maybe... Although here a simple restart fix the issue.
I will try "right-click->Properties->Repair Folder" next time I see the issue. (It is quite hard/annoying to reproduce it because I have to know that I have a new mail without looking at Thunderbird.)

By the way, I have had this bug since Autumn at least I think...

By the way, I have had this bug since Autumn at least I think...

In that case let's change the version

Version: Thunderbird 102 → Thunderbird 91
Summary: IMAP Mailbox stop synchronizing over time → IMAP Mailbox stop getting new mail over time (some days)

Need a few more details:
How often do you check for new mail? The TB default time is 10m and is set on each imap account.
How many imap accounts do you have. If more than one, does the problem occur on each of them?
What are the imap server types, such as gmail, yahoo, dovecot etc?
Are you receiving email into folders other than Inbox? If so, are the non-Inbox folders having the problem?
Does the computer sleep or hibernate during the several days it is running?
Have you made any changes with the "Config editor" trying to fix the problem?

When I over the mouse cursor in the mail list of theses mailboxes, cursor has a (forever) loading animation.

This sounds like the connection to the server has been lost and TB can't get it back. Do you see this on all folders of all accounts or just the Inboxes and other folders you are receiving mail into? We may need an IMAP:5 log to tell what is happening. But over many days a lot of data may be recorded so the log file will get very big.
Here's the info on recording the IMAP:5 log: https://wiki.mozilla.org/MailNews:Logging

Note: There's a new and as yet undocumented logging parameter that allows you to record a log over a long period and limit the file sizes: rotate:N where N is the number of megabytes the four (4) log files can grow to. There will be up to 4 files called $MOZ_LOG_FILE.moz_log.n where n is is 0 to 3. File 0 records first then 1, 2 and 3. When file 3 fills up to N megabytes, the recording overwrites file 0 and continues to "rotate". At least that's how it's supposed to work. I haven't used this but I'm trying it now and will let you know if it works.

The rotate option is documented in the source code here: https://searchfox.org/comm-central/rev/efa661f450ec2ddc1211d9cc65500fcfbacb0f66/mozilla/netwerk/docs/http/logging.rst#219

Actually, N in rotate:N is the maximum total amount of disk space the 4 files will use. So if N is 40 you will end up with 4 files each containing 10 MB of log data. With my quick test it seems to work. I now have 4 files each with 10Mb of data and it has rotate back to file 0:

$ ll -tr ~/tblog.moz_log.*
-rw-rw-r-- 1 gene gene 10485916 Aug 26 01:35 /home/gene/tblog.moz_log.1
-rw-rw-r-- 1 gene gene 10485916 Aug 26 01:35 /home/gene/tblog.moz_log.2
-rw-rw-r-- 1 gene gene 10485916 Aug 26 01:35 /home/gene/tblog.moz_log.3
-rw-rw-r-- 1 gene gene  9719008 Aug 26 01:38 /home/gene/tblog.moz_log.0

My env vars, as documented in https://wiki.mozilla.org/MailNews:Logging , are set like this:

MOZ_LOG=IMAP:5,timestamp,sync,rotate:40 
MOZ_LOG_FILE=~/tblog

You might want to allow more log space if you have room such as maybe rotate:80 based on how fast the files fill up.

Thank you for your detailed instructions.
I will come back to this bug report once I have more information to share :)

(In reply to Yamashita Ren from comment #6)

Thank you for your detailed instructions.
I will come back to this bug report once I have more information to share :)

Flags: needinfo?(lemaitre.dulotus)
See Also: → 1776823
Whiteboard: [closeme 2022-10-25]

Hello,

Sorry, for the silence, I am still in the process of making a proper bug report.

What I can say so far :

  • Sometimes, if I wait long enough and the mailbox is "focused", mailbox get unstuck and start synchronizing as it should. No more "forever loading animation". Sometimes waiting does not fix anything.
  • If I had to make a guess, I think this happens because TB goes to swap (I am on 8GB RAM). I have constant SWAP usage.
  • "Repair Folder" does not fix anything.
Whiteboard: [closeme 2022-10-25]
Flags: needinfo?(lemaitre.dulotus)
Flags: needinfo?(lemaitre.dulotus)
Whiteboard: [closeme 2024-07-01]

Resolved per whiteboard

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Flags: needinfo?(lemaitre.dulotus)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2024-07-01]
You need to log in before you can comment on or make changes to this bug.