Bug 152964 - Gmail complains of timeouts with Konqueror 3.96.1
Summary: Gmail complains of timeouts with Konqueror 3.96.1
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 01:14 UTC by Rob Davies
Modified: 2007-12-05 18:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
proposed patch (558 bytes, patch)
2007-11-28 21:51 UTC, Maksim Orlovich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Davies 2007-11-27 01:14:49 UTC
Version:            (using KDE KDE 3.96.0)
Installed from:    SuSE RPMs
OS:                Linux

I try to access Gmail via URL https://mail.google.com/mail/
which according to Wikipedia is secure (though I have doubts that current Google keep connection https).

Anyway I login, get complaint on certificate, allow it :

An error occurred while loading https://mail.google.com/mail/:
Timeout on server
 mail.google.com

Try again, and get into inbox, can open up an email.  Then go back to inbox and see this kind of message frequently :

An error occurred while loading https://mail.google.com/mail/h/s4ro07pbswdk/?v=c&th=1167e6a32fca9d42:
Timeout on server
 mail.google.com

Doing refresh webpage clears that and get display.

I  have also seen a slightly different message.
An error occurred while loading http://mail.google.com/mail/h/2owubipm4ncn/?zy=j&gausr=Rob.OpenSuSE.linux%40googlemail.com&f=1&shva=1:
Timeout on server
 mail.google.com
Comment 1 Germain Garand 2007-11-28 10:07:28 UTC
I can confirm the frequent timeouts problems on different pages. Not only on https:// but more generally.

I can reproduce easily on this page, though the errors are still random:

  http://geology.com

switch between the items in top menu (Articles, News, World Maps, etc..)
or even click the same item several times.

when it happens, debug output is:

testkhtml(24257)/khtml (part) KHTMLPart::urlSelected: KHTMLPart(0x81332c0)  urlSelected: complete URL: "http://geology.com/body.htm"  target= ""
testkhtml(24257)/khtml (part) KHTMLPart::openUrl: KHTMLPart( KHTMLPart(0x81332c0) )::openURL  "http://geology.com/body.htm"
kio_http(23211)/kio_http_debug HTTPProtocol::get: "http://geology.com/body.htm"
kio_http(23211)/kio_http_debug HTTPProtocol::checkRequestUrl: "http://geology.com/body.htm"
kio_http(23211)/kio_http_debug HTTPProtocol::resetSessionSettings: Using proxy: false URL:  "" Realm:  ""
kio_http(23211)/kio_http_debug HTTPProtocol::resetSessionSettings: Enable Persistent Proxy Connection:  false
kio_http(23211)/kio_http_debug HTTPProtocol::resetSessionSettings: Window Id = "115343370"
kio_http(23211)/kio_http_debug HTTPProtocol::resetSessionSettings: ssl_was_in_use = "FALSE"
kio_http(23211)/kio_http_debug HTTPProtocol::retrieveContent:
kio_http(23211)/kio_http_debug HTTPProtocol::retrieveHeader:
kio_http(23211)/kio_http_debug HTTPProtocol::httpOpen:
kio_http(23211)/kio_http_debug HTTPProtocol::isOffline: networkstatus <unreachable>
kio_http(23211)/kio_http_debug HTTPProtocol::httpCheckConnection: Keep Alive: true First: false
kio_http(23211)/kio_http_debug HTTPProtocol::httpOpen: Calling checkCachedAuthentication
kio_http(23211)/kio (kioslave) KIO::SlaveBase::checkCachedAuthentication: SlaveBase::checkCachedAuthInfo window =  115343370  url =  "http://geology.com/body.htm"
kded(23784)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "" , WindowId =  115343370
kio_http(23211) HTTPProtocol::httpOpen: ============ Sending Header:
kio_http(23211) HTTPProtocol::httpOpen: "GET /body.htm HTTP/1.1"
kio_http(23211) HTTPProtocol::httpOpen: "Connection: Keep-Alive"
kio_http(23211) HTTPProtocol::httpOpen: "User-Agent: Mozilla/5.0 (compatible; Konqueror/3.96; Linux) KHTML/3.96.1 (like Gecko)"
kio_http(23211) HTTPProtocol::httpOpen: "Referer: http://geology.com/body.htm"
kio_http(23211) HTTPProtocol::httpOpen: "Accept: text/html, image/jpeg, image/png, text/*, image/*, */*"
kio_http(23211) HTTPProtocol::httpOpen: "Accept-Encoding: x-gzip, x-deflate, gzip, deflate"
kio_http(23211) HTTPProtocol::httpOpen: "Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5"
kio_http(23211) HTTPProtocol::httpOpen: "Accept-Language: en-US, en"
kio_http(23211) HTTPProtocol::httpOpen: "Host: geology.com"
kio_http(23211)/kio_http_debug HTTPProtocol::httpOpen: sent it!
kio_http(23211)/kio_http_debug HTTPProtocol::readHeader:
kio_http(23211)/kio_http_debug HTTPProtocol::httpClose:
kio_http(23211)/kio_http_debug HTTPProtocol::httpCloseConnection:
testkhtml(24257)/kio (KIOJob) KIO::SlaveInterface::dispatch: error  149   "geology.com"
testkhtml(24257)/khtml (part) KHTMLPart::showError: KHTMLPart::showError d->m_bParsing= false  d->m_bComplete= true  d->m_bCleared= false
testkhtml(24257)/khtml (part) KHTMLPart::htmlError: KHTMLPart::htmlError errorCode= 149  text= "geology.com"
Comment 2 Maksim Orlovich 2007-11-28 16:55:35 UTC
It appears that TCPSlaveBase::waitForResponse with timeout of 10 minutes(!) 
times out a lot quicker, w. a negative reply
Comment 3 Maksim Orlovich 2007-11-28 17:06:48 UTC
OK, we don't actually get a response. I suspect we're doing something funny with a keep-alive connection
Comment 4 Maksim Orlovich 2007-11-28 17:10:52 UTC
... Actually... we're the ones sending the FIN
Comment 5 Maksim Orlovich 2007-11-28 18:01:34 UTC
.. It seems like in KSocketDevice::waitForMore, poll() returns that there is more input, but ioctl FIONREAD returns 0, and so the socket reports there are no bytes, and it propagates up to the slave, which decides the read timeout.
Comment 6 Maksim Orlovich 2007-11-28 21:51:29 UTC
Created attachment 22239 [details]
proposed patch

I figured it out, I think. The scenario is basically that a keep-alive
connection gets closed on us while we're waiting for a response. In KDE4,
waitForResponse returns false then, so we think we've timed out, and issue an
error. In KDE3, it would return true, then the subsequent read would signal
end-of-file, and so we would open up a new connection. The attached makes
TCPSlaveBase match KDE3 behavior. I hope. Gonna try to get thiago to review
it...
Comment 7 Rob Davies 2007-11-28 22:01:52 UTC
My god you are fast!!!  I'm impressed, and wish I could have submitted better quality reports, rather than a initial impression "Storm".

My excuse is trying to replicate a new user's experience, where you trip on things you never see again, when you're "set up".
Comment 8 Germain Garand 2007-11-28 23:23:58 UTC
the patch works very nicely here... this is a huge fix. It looks like it's going to solve about half the issues we have been seeing: images occasionally failing to load, sites breaking for no reason, sheets sometimes not loading...

e.g. the http://hop.inria.fr interactive demo was completely failing with those timeouts happening at every moment. It now works gorgeously.

Comment 9 Maksim Orlovich 2007-11-29 00:12:00 UTC
SVN commit 742809 by orlovich:

Make TCPSlaveBase::waitForResponse match its documentation and its KDE3 semantics:
return true if connection got closed on us.

The change in behavior caused the http I/O slave to think that the other end was
not responding in any reasonable time (hard failure) while it was merely closing a persistent connection,
where we should retry.  Fixes frequent "timeout on server" errors when browsing
BUG:152964


 M  +4 -1      tcpslavebase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=742809
Comment 10 Maksim Orlovich 2007-11-29 00:27:28 UTC
Thanks for testing, Germain...

And to the reporter: well, I'd first disclaim that the fixing time is atypical... just this is a critical bug, close to a release. 

Anyway, as for what you're reporting: actually, the bugs you see in your basic experience are perhaps the most important to report, since they're quite likely  to affect other people. Things that seem majorly broken probably are.
Comment 11 Rob Davies 2007-12-04 10:06:54 UTC
I've tried to check on this with SuSE Build service vesion to have updated rpm's - Konqueror 3.96.2 (KDE 4.0 >= 20071128) and I still have same issue.  Hopefully it's just cos' the patch hasn't reached me yet.
Comment 12 Rob Davies 2007-12-05 18:28:10 UTC
Have 3.96.3 now and it has been fixed, thanks! :)