Closed Bug 1512126 Opened 5 years ago Closed 5 years ago

With TB opened from a previous session, when coming out of sleep, the status bar shows 'no new messages to download.'

Categories

(MailNews Core :: Networking: IMAP, defect)

Desktop
Windows 10
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: orealius, Unassigned)

References

()

Details

Attachments

(6 files)

Attached image Clipboard01.jpg
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce:

 Put computer to sleep and sent several e-mails from different devices.


Actual results:

With TB opened from a previous session, when coming out of sleep, the status bar shows 'no new messages to download.' However, clicking 'get new e-mail' will immediately download all new messages


Expected results:

The 'automatically download new messages' under server settings is checked Any new e-mail should start to download automatically (given about 10 seconds to reconnect with The Internet)
Alias: orealius
Keywords: polish
OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop
Not a security bug that needs to stay hidden.
Alias: orealius
Group: mail-core-security
I'm new to this...Is the issue still open for resolution?
 "From the symptoms I've experienced my initial diagnosis is that there is a timing, ie timeout issue. If TB has somehow dropped the connection then Get Messages triggers its re-establishment. However such code often has a timeout set on it to prevent indefinite waits, if this timeout is too short then the timeout will be triggered, but if repeated Get Message requests are made it will eventually be made before the timeout expires resulting in non-deterministic behavior. If I was looking for the problem in the code I'd find the code where the "Looked up...." text was output and establish under what conditions it was sent and work back."

From: Tobiz TB Forum
> Is the issue still open for resolution?
Yes

your issue sounds like bug 468490.  But you've never had this issue before updating to version 60, correct?
Keywords: polish
Yes...60.3.2 For some reason I don't understand the e-mails are again being downloaded when coming out of sleep. The only thing I did was change the 'check messages up to 21 minutes and then back to 5. From reading bug 468490 there seems to be some oblique relation to that option. Meanwhile, I'll see how long this 'fix' lasts.
Let's put this in imap for now - there has been activity in some of the bugs there.
Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core
The attachment shows a POP setup, not IMAP.
I opened TB this morning from sleep and I get a message that TB is processing the account. After that it is now back to NOT downloading new messages! Hopefully this will narrow down the problem!
This is a POP3 account, right? If so, just to be clear, bug 468490 has nothing to do with this since that is only an IMAP issue.

I haven't been asked to look much at POP problems but I think, for POP, the tcp connection is made and broken down each time the check for new mail occurs. It looks like the check is set to occur every minute.

Reporter, can you check with some type of monitor like (wireshark or tcpdump) if the the server is being connected to every minute before and after the sleep?

Another alternative is to record the POP3 log that tb can produce. See https://wiki.mozilla.org/MailNews:Logging for details.

Specifically, run these command or make a batch/script file and start tb using it (assuming windows):

set MOZ_LOG=POP3:5,timestamp
set MOZ_LOG_FILE=%USERPROFILE%\Desktop\pop3.log
"%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe"

With tb running from these command, allow the computer to run several minutes so that multiple checks for new mail occur. Then let the computer sleep a while (sending an email from another system while asleep would be good) and wake it up and allow several more minutes to elapse so, hopefully, new mail is checked again several times. Then shutdown tb and attach the pop3.log to this bug.
You mean run a CMD and enter the 3 commands above?
Yes, that should work.
You can also create a batch file and run the batch file. Details for windows is here: https://wiki.mozilla.org/MailNews:Logging#Windows (just change IMAP to POP3 and imap.log to pop3.log).
I can't see where the attachment option is!
Flags: needinfo?(orealius)
This attachment in response to latest request for a log file regardin 'resuming from sleep
Flags: needinfo?(orealius)
I've been able to correct the problem by going to server settings advanced and choosing option to "download mail and choose the following folder to store new messages." The message comes up: "If you store this account's new mail in a different account's Inbox, you will no longer be able to access already downloaded e-mail for this account. If you have mail in this account, please copy it to another account first.

If you have filters that filter mail into this account, you should disable them or change the destination folder. If any accounts have special folders in this account (Sent, Drafts, Templates, Archives, Junk), you should change them to be in another account.

Do you still want to store this account's e-mail in a different account?

I simply choose "cancel" then reboot the computer and TB will automatically download new messages...as it should.

Hope this helps!!!
(In reply to orealius from comment #3)
>  "From the symptoms I've experienced my initial diagnosis is that there is a
> timing, ie timeout issue. If TB has somehow dropped the connection then Get
> Messages triggers its re-establishment. However such code often has a
> timeout set on it to prevent indefinite waits, if this timeout is too short
> then the timeout will be triggered, but if repeated Get Message requests are
> made it will eventually be made before the timeout expires resulting in
> non-deterministic behavior. If I was looking for the problem in the code I'd
> find the code where the "Looked up...." text was output and establish under
> what conditions it was sent and work back."
> 
> From: Tobiz TB Forum

Yes...it must be a timeout problem. Is there any way to determine how long before TB loses connection with the server? Also, very strange how the problem is corrected TEMPORARILY: by going to server settings advanced and choosing option to "download mail and choose the following folder to store new messages." The message comes up: "If you store this account's new mail in a different account's Inbox, you will no longer be able to access already downloaded e-mail for this account. If you have mail in this account, please copy it to another account first.

If you have filters that filter mail into this account, you should disable them or change the destination folder. If any accounts have special folders in this account (Sent, Drafts, Templates, Archives, Junk), you should change them to be in another account.

Do you still want to store this account's e-mail in a different account?

I simply choose "cancel" then reboot the computer and TB will automatically download new messages...as it should.
(In reply to orealius from comment #14)
> Created attachment 9031522 [details]
> create_imap_log.bat.txt
> 
> This attachment in response to latest request for a log file regardin
> 'resuming from sleep

Sorry for the delay in responding. You do realize that the attachment you made is just the commands that need to be run to make the pop3.log file, right? This isn't the log file that would be helpful to see.
(In reply to orealius from comment #15)
> I've been able to correct the problem by going to server settings advanced
> and choosing option to "download mail and choose the following folder to
> store new messages." The message comes up: "If you store this account's new
> mail in a different account's Inbox, you will no longer be able to access
> already downloaded e-mail for this account. If you have mail in this
> account, please copy it to another account first.
> 
> If you have filters that filter mail into this account, you should disable
> them or change the destination folder. If any accounts have special folders
> in this account (Sent, Drafts, Templates, Archives, Junk), you should change
> them to be in another account.
> 
> Do you still want to store this account's e-mail in a different account?
> 
> I simply choose "cancel" then reboot the computer and TB will automatically
> download new messages...as it should.
> 
> Hope this helps!!!

Does this actually fix the problem? I will have to check one of my test POP accounts tomorrow to see what this is about!
Only for a day or two!
(In reply to gene smith from comment #17)
> (In reply to orealius from comment #14)
> > Created attachment 9031522 [details]
> > create_imap_log.bat.txt
> > 
> > This attachment in response to latest request for a log file regardin
> > 'resuming from sleep
> 
> Sorry for the delay in responding. You do realize that the attachment you
> made is just the commands that need to be run to make the pop3.log file,
> right? This isn't the log file that would be helpful to see.


(In reply to gene smith from comment #17)
> (In reply to orealius from comment #14)
> > Created attachment 9031522 [details]
> > create_imap_log.bat.txt
> > 
> > This attachment in response to latest request for a log file regardin
> > 'resuming from sleep
> 
> Sorry for the delay in responding. You do realize that the attachment you
> made is just the commands that need to be run to make the pop3.log file,
> right? This isn't the log file that would be helpful to see.

(In reply to gene smith from comment #17)
> (In reply to orealius from comment #14)
> > Created attachment 9031522 [details]
> > create_imap_log.bat.txt
> > 
> > This attachment in response to latest request for a log file regardin
> > 'resuming from sleep
> 
> Sorry for the delay in responding. You do realize that the attachment you
> made is just the commands that need to be run to make the pop3.log file,
> right? This isn't the log file that would be helpful to see.

I'm not sure what log you are looking for. I'm not that hip to troubleshooting TB; Can you also remind me how to send an attachment in Bugzilla?
It's near the top under the "Attachments" section. Click the link called "Attach File". (You must have found it at some point since you did attach a file in comment 14.)

With your original configuration without the workaround you described, try to do the procedure I described in comment 9 by running the file you created called create_imap_log.bat in a cmd terminal (a.k.a, a dos box). Be sure to have tb shutdown before you run the file since the file will start up thunderbird itself. (Note: the file you attached will actually create a pop log but the name doesn't matter.)

If you prefer not to "troubleshoot TB" then I suggest you post comments to a Thunderbird user support forum like Mozillazine instead of using bugzilla.mozilla.org.  Thanks!
Okay...giving it another try.
(In reply to orealius from comment #22)
> Created attachment 9032216 [details]
> create_pop3_log.bat.txt
> 
> Okay...giving it another try.

1. Did you actually run the create_pop3_log.bat file? You again just attached the .bat.txt file. You may need to rename the attached file to create_pop3_log.bat and run that in cmd box.

2. If you did get tb to run with the attached file, you need to attach the POP3.log file that is produced, not the bat file that runs tb for logging purposes.
P/S: The POP3.log file should appear on your Desktop.
Here's what I get. (attached) What am I missing?
Attached file create_pop3_log.bat
Maybe this is what you are looking for?
You keep attaching the batch file you need run to generate the log file instead of the generated log file!
You need to read and follow the instructions here:
https://wiki.mozilla.org/MailNews:Logging#Windows
It says you can just click on the create_pop3_log.bat file using File Explorer in windows to run it. So you really don't have to use the cmd window. (Sorry, I don't use windows much so I am rusty on using it.)

So I would do this:
0. Shutdown tb
1. With notepad create and save the create_pop3_log.bat file and save it somewhere (maybe Documents or Desktop doesn't matter). Actually, you have already done this.
2. With windows file explorer (not the web browser) find the file create_pop3_log.bat and double click it to run tb. Tb should start running.
3. Click check for new mail in tb.
4. Shutdown tb.
5. File POP3.log should now exists on Desktop. Try to open it with notepad.
6. Let me know if there is anything in it. If so, attach POP3.log (not the batch file again!) for practice.

This just verifies you can record the log file. If this works repeat from step 0 again and do the things I suggested in comment 9 last paragraph to record a truly useful POP3.log and attach it. 

If this doesn't work, please describe exactly what you did so maybe I can point out where you are going wrong.
The notepad opened...nothing in it. For some reason the notepad did not show up on the desktop...even though it was there as I found it via Windows search. This should make it easier to proceed. I will start over tomorrow.

Thank you for bearing with me on this!
I tried to duplicate your problem with a pop account I have. Sent an email with computer sleeping and then woke it up. Email immediately downloaded and appeared as it should. However, before I put it to sleep I did the workaround steps that you describe so maybe that affected it. I don't see how that could, but who knows.

I was also able to obtain the pop3.log but I am not real familiar with it. I do see the connection to pop server when computer comes out of sleep. So we should see something similar with yours when you succeed in creating the log.

Above you say "notepad did not show up on desktop". Do you mean POP3.log didn't show up on desktop. (There may also be a "shortcut" to notepad on the desktop just for easy access to run it.)
Test in comment 29 was done on linux. I set up my pop3 account on windows 7 laptop and it worked ok too. New message was almost immediately received after coming out of sleep and hibernate (worked both ways). I did not do your workaround on windows so that didn't affect it for sure.

Also, on win7 I created the .bat file using notepad and saved it to Desktop. Now I see where you got the *.bat.txt file you attached! Notepad defaults to saving everything as *.txt so if you say save create_pop3_log.bat it saves it as create_pop3_log.bat.txt !!  In notepad you have to change the "save as type" to "All files (*.*) for it to save as just *.bat. (That's why I luv windows!) But you can just rename it back to .bat to fix it, that you might already know.

Anyhow, once I saved the .bat to Desktop I could just click on it to run tb and it puts the POP3.log file on the Desktop like it should. Clicking on the .bat actually brings up the cmd window that runs tb.

Does it matter how long windows is sleeping to see the problem?  I only let it sleep long enough to send a messages from another computer.
I figured out what is going on...at least with the POP3 Log file. For some reason Win 10 saves the POP3 in the desktop folder but it only shows up as an POP3.log in the search window. Very weird, as I've been searching all over the desktop for it. Who knows why it only shows up when you do a search. I also was able to produce the log by clicking on Notepad file. So, tomorrow I will get that log out.

Thanks
Check the file properties/attributes. Is it a hidden file?
Flags: needinfo?(orealius)
The Bat file no longer creates a log on the desktop or anywhere else....I'm baffled!
Flags: needinfo?(orealius)
When you click on the .bat file does tb at least run?

Make sure you are really running a tb version 60 like the bug info above indicates. If you are running the previous release 52 that batch file won't produce a log. Check this by clicking on the 3 short horizontal lines near the upper right side of the main tb window, then select "Help" and then "About Mozilla Thunderbird". 

If you are not running tb 60, let me know the actual version and I will attach a corrected .bat file for you to use.

Win7 was sleeping with tb running for about 9 or 10 hours and just sent an email from another computer to my pop account. Then woke up the sleeping win7 and running tb immediately noticed the new email and downloaded it with minimal delay. So, so far, this seems to work for me.
Using 60.3.3

Win 10 has some quirks I never saw in Win 7, This might be one of them. But there should be a way to reliably get the log file.
If you see the .bat file on desktop, try right clicking it and "run as administrator" ... ???
No Cigar!
Does tb run when you double-click the file?
Yes
I have win10 but it's not running now and I don't have a tb pop3 account on it now.

So try this on win10.

1. Open a cmd window.
2. Enter the command 
set MOZ_LOG=POP3:5,timestamp
3. Enter the command
set MOZ_LOG_FILE=.\POP3.log
4. Enter the command
thunderbird

Thunderbird should run. Click get new messages. Shutdown thunderbird.

In cmd window do the command
dir *.log

Do you see the pop3.log file listed? If so, in the cmd window do command
notepad POP3.log
to see the file.

If this doesn't work I will fire up my win10 and try it.
Does not open TB
Ok, guess it's not in the PATH. So instead of just thunderbird, enter this instead:
%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe
P/S: if that doesn't work try putting quotes around it.
Running that opens the start menu!
Even with quotes like this?
"%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe"

I now havewin10 up and running. Will try tb with pop3 on it. Maybe I'll see something useful...
gracias!
With win10 I have no problem recording the pop3.log file either from the batch file on desktop or manually typing in the commands from the cmd window, but quotes are needed on "%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe" due to the spaces.

When I send an email to pop3 on win10 with win10 sleeping, on wakeup, tb on win10 doesn't immediately check for new mail. It seems to wait for the timer to time out. I'm not sure if tb uses the "wall time" or internal timer ticks to determine when to check for new pop mail. I suspect it is using internal ticks so that if win10 has been sleeping for hours, it still may take up to 10m (or whatever is set by the user) before a check for new mail occurs after wake-up. I am pretty sure that wall time is not used since that would be much more complex since daylight savings time, time zones etc would have to be handled.

I checked this on win7 too. I verified this by turning off check for new mail timer and after sleep there is never a check unless "get messages" is clicked. If timer is enabled and set to 30m, after sleep no new mail is automatically checked until 30m.

Basically, tb doesn't even know the host os was sleeping. The simple tick timer just stop when the os sleeps and starts back up when the os wakes up. 

So unless I am missing something, I think this bug report is invalid.
Well, guess I'm wrong. If mail check time on 10m interval and os sleeps past the expected test time, on wake up, an immediate check for new mail occurs. For me, the new mail is always detected and downloaded. So, at this point, this bug is "Cannot duplicate" instead of "invalid". 

I can tell this by looking at the log. 

Reporter, please try again to create the log. Set check time to 10m. Verify in log that events occur on 10m interval. Then send an email and sleep for at least 12 minutes. Then wake up and see if log shows new email is detected immediately. This looks OK to me on win10.
Am I the reporter?
Just found the latest attempt at a log file somewhere in the C drive (not specified) Did a search through windows explorer this time. I will try again later following your steps.
Reporter orealius: I have sent you an email with an updated version of the .bat file attached plus some more information on how to run it and interpret the .log file. Hopefully juno will not throw it away as spam since it contains a .bat attachment.
Bug 255393 sounds similar to this bug. However, I have still not been able to duplicate the reported problem. I have been working with the reporter outside of bugzilla via email to diagnose the problem. I will report back here with the results.
The reporter determined that the problem was caused by a bad/intermittent Ethernet card. POP3 biff occurs properly on exit from sleep/hibernate.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: