Version: 4.5 (using KDE 4.5.3)
When transferring a file across a high-bandwidth connection, kio_http can get into a state where it consumes 100% CPU and makes no progress in receiving the transmitted file. I can trigger this, for example, using woof to serve a large file on the local machine, then attempting to download it through konqueror. The kio_http process very quickly becomes busy and unresponsive, and stops downloading.
I found that the cause is due to an issue in Qt (which I have already filed: http://bugreports.qt.nokia.com/browse/QTBUG-16123 - also see the ML posts mentioned there) where if the read buffer is full when the waitForReadyRead method is called, the method will enter an infinite busy loop. It should rather return an error. What makes this problem applicable to KDE, however, is that KDE really should not call waitForReadyRead with a full buffer in the first place - that is asking Qt to fulfill impossible conditions, which of course it can't.
Presumably a future release of Qt will return with an error when this method is called on a full buffer. kio_http should avoid calling waitForReadyRead when there is data already available.
Steps to Reproduce:
Download a file from a fast server over a high-bandwidth connection. A local socket seems to work, too.
Some of the file may be downloaded, but soon kio_http stops downloading and consumes 100% CPU.
SVN commit 1209481 by adawit:
- Commented out the code that attempted to do a read ahead optimization because it causes
the condition mentioned in BR# 260769.
M +7 -6 tcpslavebase.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=1209481
See comment #1 and feel free to reopen if the problem persists for you once you have tried KDE 4.6...