Closed Bug 315420 Opened 19 years ago Closed 19 years ago

Connection to server xx timed out when trying to retrieve POP3 messages (only when Multi-core or Hyper Threading)

Categories

(Thunderbird :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 307527

People

(Reporter: xbjorn, Assigned: mscott)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051101 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051101 Firefox/1.6a1

With 1.5 RC1 and nightly builds I get a connection timed out message _immediately_ when pressing "Get mail"-button. Occasionally it works and if there is any new mail it is downloaded correctly.

1.0.7 stable does not have this problem, everything works fine there.

The error occurs on my newly built machine at home. At work the same version works on the macbine there.

My home machine is an Athlon 64 X2 4600+, NForce 4, 2Gb RAM. No software firewalls are running. Internet access is on 8 Mbit ADSL.

I have two configurations of thunderbird (two users on the same machine). One with six POP3 accounts on two different servers, and one with only one POP3 account. Same error on both configurations, on all three servers.

Reproducible: Always

Steps to Reproduce:
do you have multiple processors/hyper threading? If so, this is probably a duplicate. You might try setting the time out in tools | options | advanced | general to a very large number like 65533 for now. Our timeouts are a fail-safe in case the OS's timeouts aren't getting triggered, so you may not need the timeout.
My machine is dual core.

Setting the time out to 65535 seem to solve the problem for me.

I couldn't find the bug you are referring to. I see now that the bug title involving only IMAP servers must have confused me, if that is the duplicate you are referring to.

Thank you! 
(In reply to comment #0 and comment #2)
> With 1.5 RC1 and nightly builds I get a connection timed out message
> Setting the time out to 65535 seem to solve the problem for me.

When 1.0.x, timeout related parameter is mail.pop3_response_timeout(default:45 sec., no message is issued even when timeout.) 
But, AFAIR, this was not applicable for connection. 
This is changed on 1.5, and new mailnews.tcptimeout(default:60 sec., error message is issued) is introduced.

Since reporter of Bug 307527 says "no problem when POP3/NEWS", the bug for "dual core" only issue has "IMAP" in summary. 
Reporter, get protocol log of POP3 for your problem, if you want to clarify whether your problem is only a timeout issue or "dual core" related/only issue.
See http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#pop
(Change "protocol:5" to "POP3:5" for POP3, "POP3:5,IMAP:5" for both.)
 - Case-1 : mailnews.tcptimeout=default
 - Case-2 : mailnews.tcptimeout=120 (more than 60. try some other values.)
Attached file POP3-log for timeout 60 sec. (deleted) —
All connections timed out. Six accounts total on two different servers, (I could only find one of the servers in the log?) The log is created at startup of thunderbird only. (Check for new messages at startup on all accounts)
Attached file POP3 log for timeout 65535 seconds (deleted) —
No connections timed out.
I'm reasonably sure this is going to have the same underlying cause as Bug 307527 even if it manifests itself differently for different protocols on different machines. From what I can tell investigating bug 307527, time is going backwards, which is much stranger than the other stuff :-)
(In reply to comment #4)
Björn, your protocol log says "RECV: +OK AVG POP3 Proxy Server".
(Q1) Do you enable mail scan function of AVG on your client PC?
     Or direct connection to the POP3 servers?
I still can't say "dual(multi) core" only problem, although I suspect it as David says since you say next in comment #0.
> I get a connection timed out message _immediately_
> when pressing "Get mail"-button..
(Q2) Does mailnews.tcptimeout=90 or 120 or 180 resolve your timeout problem
     when "dual core"?
(Q3) What will happen when CPU affinity is set to CPU 0 only?
     (with mailnews.tcptimeout=60)
     See bug 307527 for setting CPU affinity.

By the way, David, is there any way to put timestamp in protocol log?      
no, the logging you get is what we've got.

Setting the timeout to 65535 seems to help, but 180 won't (we're getting a negative number for the timeout, so you need to set it to 65534 because that's -1)
Q1: Yes I have AVG on my PC. I didn't have that installad on my old PC, so I actually forgot I had it running on the new one. However, disabling the e-mail scanner makes no difference.

Q2: 120 or 180 doesn't help.

Q3: Using task manager to set thunderbird to run on CPU 0 or 1 but not both makes the timeouts disappear.
(In reply to comment #8)
> no, the logging you get is what we've got.
Thanks David. I've found still-open Bug 86396 for it, which had been opened/closed as LATER in 2001-06, and was re-opened in 2002-04, and is still open... sigh...(In reply to comment #9)

(In reply to comment #9)
> Q1: (snip) disabling the e-mail scanner makes no difference.
> Q2: 120 or 180 doesn't help.
> Q3: Using task manager to set thunderbird to run on CPU 0 or 1 but not both
> makes the timeouts disappear.

According to your response, this bug's issue is apparently "NOT multi-CPU by 'dual core' issue".
Sounds counter/clock related OS's(MS Win's) bug when some processors/BIOS's, such as bug mentioned by Bug 307527 Comment #26...

> According to your response, this bug's issue is apparently "NOT multi-CPU by
> 'dual core' issue".

I'm not sure I understand, so just to make sure: The problem goes away when running exlusively on one of two available CPUs (Cores).

QueryPerformanceCounter returns 108966226853788 on this machine btw.
The value of QueryPerformanceCounter was perhaps not very interresting, but the way it may leap. Do you want me to run any test-cases on this machine to verify any theories?
Björn, do you have a source tree that you can make changes to and rebuild? If so, you can look at this comment: https://bugzilla.mozilla.org/show_bug.cgi?id=307527#c26
I haven't tried to compile the mozilla sources, and I don't think I can manage to get the time free to set up the build environment, at least not on short term. Is it possible to get a binary with the code change in the mean time?

Or if you have testcases which can be compiled in Visual Studio.
(In reply to comment #11)
> The problem goes away when running exlusively on one of two available CPUs (Cores).

Thanks for clarifying - apparently "using single core only is a workaround".

New question.
(Q4) Is setting /usepmtimer in boot.ini a workaround when using "dual core"?
Some sites say /usepmtimer is solution of some problems on MS Win when AMD "dual core" Athron or Intel HyperThreading.
 - http://support.microsoft.com/?id=835730
 - http://forums.amd.com/lofiversion/index.php/t46434.html
 - http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-57463
   (Thinkpad G41 is Intel HT model)
/usepmtimer was a workaround.
(In reply to comment #16)
> /usepmtimer was a workaround.
It's very very good news! Björn, thank you very much for your quick testing.
Adding "multi-core" in summay for ease of search.
Summary: Connection to server xx timed out when trying to retrieve POP3 messages → Connection to server xx timed out when trying to retrieve POP3 messages (only when Multi-core or Hyper Threading)
*** Bug 320908 has been marked as a duplicate of this bug. ***
Confirming based on DUP Bug 320908 when Athlon 64 X2(POP3 issue when MS Win XP on Dual Core), although I can't re-produce the problem(all my processors are single core).
Status: UNCONFIRMED → NEW
Ever confirmed: true
*** Bug 324431 has been marked as a duplicate of this bug. ***
I think this bug is DUP of Bug 307527 because of Comment #6 by David Bienvenu and because that protocol itself has no relation to problem, cause of the problem and solution(workaround), but I'm not sure whether really DUP or not.
So putting Bug 307527 in dependency tree.   
Depends on: 307527
I'm fairly confident it's a dup. We'll see now that the fix has been checked in.

*** This bug has been marked as a duplicate of 307527 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: