Freeze while Synchronizing FTP directories

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Freeze while Synchronizing FTP directories

Post by *tm8544 »

Occasionally TC 7.55 beta 3 will hang during synchronising FTP directories.
It happens either while comparing or synchronising.
After selecting cancel, TC totally stops responding and has to be stopped using Task manager.

It seems that the hanging can be avoided with a careful use of passive/active mode and use of MLSD, but it is tedious to test these options when TC freezes totally.

I have never detected this kind of behaviour with 7.50a or earlier versions (meaning this total freezing of TC with FTP/synchronise).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I have never seen that. Please allow the system to report the hang to Microsoft, this will allow me to see the location where it hangs.
Author of Total Commander
https://www.ghisler.com
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

ghisler(Author) wrote:Strange, I have never seen that. Please allow the system to report the hang to Microsoft, this will allow me to see the location where it hangs.
I don't know how to report the hang, because I never get that dialog asking to report to Microsoft.

Here is one example.
using passive mode, mlsd=autodetect.

After a while, directory comparing hangs. This is the what it looks like when it does not progress any more.
Image: http://personal.inet.fi/koti/timom/tc1-reading-directory.jpg

Then I press cancel, and see this (PORT-command failed)
Image: http://personal.inet.fi/koti/timom/tc2-after-cancel.jpg

After pressing OK, TC stops responding totally.
Image: http://personal.inet.fi/koti/timom/tc3-freeze.jpg

In Task manager, when I choose to kill TC, it says that TC cannot close because it is waiting for user input.
But, as far as I can tell, there is no input dialog visible.

The fact that directory comparing hangs, may be a result of the FTP-server. It happens only occasionally. I have been able to produce it only twice today.

But what is the actual problem is that TC does not recover from the situation.
User avatar
roentgen
Power Member
Power Member
Posts: 757
Joined: 2005-12-03, 19:58 UTC

Post by *roentgen »

I've got similar hangs with my FTP server (Pureftpd) when it had a limit of ~5 simultaneous connections (IIRC). It always hanged when I tried to transfer lots of files (e.g. an unpacked Joomla install archive) while it worked just fine in Fillezilla.

After many tests I just increased the number of simultaneous connections to ~40 and all seems fine now.

PS: I used passive mode already.
TC for Linux please!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I don't know how to report the hang, because I never get that dialog asking to report to Microsoft.
Then TC itself was not hanging, just the connection.

Try using passive mode. It hangs when sending PORT, which usually means that a firewall is blocking specific ports. FTP uses random ports between 1024 and 65535, so if a firewall blocks certain ports and doesn't support FTP packet inspection, the connection may be blocked.
Author of Total Commander
https://www.ghisler.com
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

ghisler(Author) wrote:
I don't know how to report the hang, because I never get that dialog asking to report to Microsoft.
Then TC itself was not hanging, just the connection.

Try using passive mode. It hangs when sending PORT, which usually means that a firewall is blocking specific ports. FTP uses random ports between 1024 and 65535, so if a firewall blocks certain ports and doesn't support FTP packet inspection, the connection may be blocked.
As you can see from my second post, I was using passive mode.

But if only the connections was hung, how come it is not possible to exit synchronizing without killing TC using Task Manager?

And what about this (also in previous post): In Task manager, when I choose to kill TC, it says that TC cannot close because it is waiting for user input. But, as far as I can tell, there is no input dialog visible.
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

tm8544 wrote:
ghisler(Author) wrote:
I don't know how to report the hang, because I never get that dialog asking to report to Microsoft.
Then TC itself was not hanging, just the connection.

Try using passive mode. It hangs when sending PORT, which usually means that a firewall is blocking specific ports. FTP uses random ports between 1024 and 65535, so if a firewall blocks certain ports and doesn't support FTP packet inspection, the connection may be blocked.
As you can see from my second post, I was using passive mode.

But if only the connections was hung, how come it is not possible to exit synchronizing without killing TC using Task Manager?

And what about this (also in previous post): In Task manager, when I choose to kill TC, it says that TC cannot close because it is waiting for user input. But, as far as I can tell, there is no input dialog visible.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC is still reacting to user input, but it refuses to close because the FTP connection is still busy.
As you can see from my second post, I was using passive mode.
TC only sends PORT in passive mode if passive mode fails, e.g. the server refuses the connection. Maybe it's still a firewall problem (but on the server side)?
Author of Total Commander
https://www.ghisler.com
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

ghisler(Author) wrote:TC is still reacting to user input, but it refuses to close because the FTP connection is still busy.

TC only sends PORT in passive mode if passive mode fails, e.g. the server refuses the connection. Maybe it's still a firewall problem (but on the server side)?
I agree that is is very likely a firewall problem on the server side. Or some other problem, because it does not happen on every connection.

Regarding TC refusing to close while FTP is busy, is there some timeout which I could change to make TC to close a bit sooner?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately not - in this case, the timeout is in Windows itself.
Author of Total Commander
https://www.ghisler.com
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

Finally I was able to produce a crash related to this issue.

After a failed PORT-command during ftp-synchronising operation, I closed sync window and immediately after that closed TC window. As s result of that, the following crash report was generated:

---------------------------
Total Commander 7.55pb3.
---------------------------
Access violation at address 0053DFF3. Read of address 0000004C.
Access violation at address 0053DFF3. Read of address 0000004C
Windows 7 6.1 (Build 7600)

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000005
Stack trace:
0053DFF3
53E2CD 444D16 >414554 4442D7 414554 419C20
419CB8 6B7C71
Raw:
53DFB3 53E2CD 442DD5 444FE5 442DD5 416230
444399 444D16 414554 4442D7 414554 419C20
419CB8 419E72 6B7C71
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Kyllä Ei
---------------------------
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, that doesn't seem to be related to the reported bug. Your error occurs when TC tries to refresh the file list in one panel.
Author of Total Commander
https://www.ghisler.com
tm8544
Junior Member
Junior Member
Posts: 25
Joined: 2008-11-29, 08:11 UTC
Location: Finland

Post by *tm8544 »

After some testing with RC3, I have not been able to reproduce this error.
Even with RC2 it happened occasionally.
Perhaps the change in code in RC3 had some effect also to this issue?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48231
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Are you using FTP over SSL (encrypted)? If yes, you may be suffering from the Windows 7 firewall bug, because of which I had to delay the release of TC 7.55 final. This bug causes frequent connection losses when using secure ftp over ssl, also in other programs like FileZilla. These programs (and now also TC) detect this connection loss and reconnect automatically. You can see the reconnect in the log by searching for the text:
SSL_read returned -1
Author of Total Commander
https://www.ghisler.com
Post Reply