Bug 153301 - KIO job sometimes freeze
Summary: KIO job sometimes freeze
Status: RESOLVED WORKSFORME
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Thiago Macieira
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2007-12-02 21:00 UTC by Jiri Klement
Modified: 2018-10-27 04:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (2.76 KB, text/plain)
2007-12-02 21:02 UTC, Jiri Klement
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Klement 2007-12-02 21:00:14 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

KIO::Get job sometimes freeze. For example in krusader's functions Split File & Combine File.

I think problem is in SocketConnectionBackend::socketReadyRead method (kdelibs/kio/kio/connection.h). The method checks socket->bytesAvailable() to make sure it could read complete message at once. But sometimes QSocket can't get more data from underlying connection until it's buffer is emptied.

When I changed this method to read data into my buffer as soon as they are available, krusader no longer freezed.
Comment 1 Jiri Klement 2007-12-02 21:02:10 UTC
Created attachment 22287 [details]
Patch
Comment 2 Thiago Macieira 2007-12-18 12:30:11 UTC
First of all, please don't include whitespace changes in the patch. It makes a lot harder to read.

Second, I am not sure I can accept your patch. With it, the connection would keep on reading even though the connection is suspended. The real question to be asked here is: why was the connection suspended if we're waiting for stuff to be read?

Unless you're looking at the fact that setReadBufferSize in QTcpSocket does not trigger reading again. This is fixed in Qt 4.4.
Comment 3 Jiri Klement 2007-12-18 13:54:52 UTC
Sorry for the whitespaces.

I think the connection is suspended because socket received so much data than it didn't fit into its buffer. I seems than in this case socket waits until its buffer is completely empty before it starts reading again.

I noticed this when I changed connection to use TCP sockets. When I watched packets in wireshark I noticed than when connection freeze there is Window full packet followed by lots of Zero Window packets.

I don't know how to watch local sockets, but it appeared than the patch fixed it for local sockets too.
Comment 4 Dawit Alemayehu 2013-06-15 06:51:01 UTC
Is this applicable to KDE 4's KIO code?
Comment 5 Andrew Crouthamel 2018-09-24 02:03:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Andrew Crouthamel 2018-10-27 04:14:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!